@algolia/abtesting 1.21.1 → 1.22.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 +145 -3
- package/dist/builds/browser.js +312 -1
- 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 +7 -7
- package/dist/builds/fetch.js +312 -1
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +312 -1
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +312 -1
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +312 -1
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +145 -3
- package/dist/node.d.cts +145 -3
- package/dist/node.d.ts +145 -3
- package/dist/src/abtestingV3Client.cjs +312 -1
- package/dist/src/abtestingV3Client.cjs.map +1 -1
- package/dist/src/abtestingV3Client.js +312 -1
- package/dist/src/abtestingV3Client.js.map +1 -1
- package/dist/worker.d.ts +145 -3
- 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.22.0
|
|
44
44
|
# or
|
|
45
|
-
npm install @algolia/abtesting@1.
|
|
45
|
+
npm install @algolia/abtesting@1.22.0
|
|
46
46
|
# or
|
|
47
|
-
pnpm add @algolia/abtesting@1.
|
|
47
|
+
pnpm add @algolia/abtesting@1.22.0
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
### Without a package manager
|
|
@@ -52,7 +52,7 @@ pnpm add @algolia/abtesting@1.21.1
|
|
|
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.22.0/dist/builds/browser.umd.js"></script>
|
|
56
56
|
```
|
|
57
57
|
|
|
58
58
|
### Usage
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _algolia_client_common from '@algolia/client-common';
|
|
2
|
-
import { CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
|
|
2
|
+
import { CreateClientOptions, RequestOptions, AlgoliaHttpResponse, ClientOptions } from '@algolia/client-common';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Multiple-testing correction method applied when evaluating metric significance.
|
|
@@ -512,14 +512,14 @@ type StopABTestProps = {
|
|
|
512
512
|
id: number;
|
|
513
513
|
};
|
|
514
514
|
|
|
515
|
-
declare const apiClientVersion = "1.
|
|
515
|
+
declare const apiClientVersion = "1.22.0";
|
|
516
516
|
declare const REGIONS: readonly ["de", "us"];
|
|
517
517
|
type Region = (typeof REGIONS)[number];
|
|
518
518
|
type RegionOptions = {
|
|
519
519
|
region?: Region | undefined;
|
|
520
520
|
};
|
|
521
521
|
declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & RegionOptions): {
|
|
522
|
-
transporter: _algolia_client_common.
|
|
522
|
+
transporter: _algolia_client_common.TransporterWithHttpInfo;
|
|
523
523
|
/**
|
|
524
524
|
* The `appId` currently in use.
|
|
525
525
|
*/
|
|
@@ -561,6 +561,18 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
561
561
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
562
562
|
*/
|
|
563
563
|
addABTests(addABTestsRequest: AddABTestsRequest, requestOptions?: RequestOptions): Promise<ABTestResponse>;
|
|
564
|
+
/**
|
|
565
|
+
* Creates a new A/B test.
|
|
566
|
+
*
|
|
567
|
+
* 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.
|
|
568
|
+
*
|
|
569
|
+
* Required API Key ACLs:
|
|
570
|
+
* - editSettings
|
|
571
|
+
* @param addABTestsRequest - The addABTestsRequest object.
|
|
572
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
573
|
+
* @see addABTests for the plain version.
|
|
574
|
+
*/
|
|
575
|
+
addABTestsWithHTTPInfo(addABTestsRequest: AddABTestsRequest, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<ABTestResponse>>;
|
|
564
576
|
/**
|
|
565
577
|
* This method lets you send requests to the Algolia REST API.
|
|
566
578
|
* @param customDelete - The customDelete object.
|
|
@@ -569,6 +581,17 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
569
581
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
570
582
|
*/
|
|
571
583
|
customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
584
|
+
/**
|
|
585
|
+
* This method lets you send requests to the Algolia REST API.
|
|
586
|
+
*
|
|
587
|
+
* 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.
|
|
588
|
+
* @param customDelete - The customDelete object.
|
|
589
|
+
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
590
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
591
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
592
|
+
* @see customDelete for the plain version.
|
|
593
|
+
*/
|
|
594
|
+
customDeleteWithHTTPInfo({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<Record<string, unknown>>>;
|
|
572
595
|
/**
|
|
573
596
|
* This method lets you send requests to the Algolia REST API.
|
|
574
597
|
* @param customGet - The customGet object.
|
|
@@ -577,6 +600,17 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
577
600
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
578
601
|
*/
|
|
579
602
|
customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
603
|
+
/**
|
|
604
|
+
* This method lets you send requests to the Algolia REST API.
|
|
605
|
+
*
|
|
606
|
+
* 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.
|
|
607
|
+
* @param customGet - The customGet object.
|
|
608
|
+
* @param customGet.path - Path of the endpoint, for example `1/newFeature`.
|
|
609
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
610
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
611
|
+
* @see customGet for the plain version.
|
|
612
|
+
*/
|
|
613
|
+
customGetWithHTTPInfo({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<Record<string, unknown>>>;
|
|
580
614
|
/**
|
|
581
615
|
* This method lets you send requests to the Algolia REST API.
|
|
582
616
|
* @param customPost - The customPost object.
|
|
@@ -586,6 +620,18 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
586
620
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
587
621
|
*/
|
|
588
622
|
customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
623
|
+
/**
|
|
624
|
+
* This method lets you send requests to the Algolia REST API.
|
|
625
|
+
*
|
|
626
|
+
* 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.
|
|
627
|
+
* @param customPost - The customPost object.
|
|
628
|
+
* @param customPost.path - Path of the endpoint, for example `1/newFeature`.
|
|
629
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
630
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
631
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
632
|
+
* @see customPost for the plain version.
|
|
633
|
+
*/
|
|
634
|
+
customPostWithHTTPInfo({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<Record<string, unknown>>>;
|
|
589
635
|
/**
|
|
590
636
|
* This method lets you send requests to the Algolia REST API.
|
|
591
637
|
* @param customPut - The customPut object.
|
|
@@ -595,6 +641,18 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
595
641
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
596
642
|
*/
|
|
597
643
|
customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
|
|
644
|
+
/**
|
|
645
|
+
* This method lets you send requests to the Algolia REST API.
|
|
646
|
+
*
|
|
647
|
+
* 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.
|
|
648
|
+
* @param customPut - The customPut object.
|
|
649
|
+
* @param customPut.path - Path of the endpoint, for example `1/newFeature`.
|
|
650
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
651
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
652
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
653
|
+
* @see customPut for the plain version.
|
|
654
|
+
*/
|
|
655
|
+
customPutWithHTTPInfo({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<Record<string, unknown>>>;
|
|
598
656
|
/**
|
|
599
657
|
* Deletes an A/B test by its ID.
|
|
600
658
|
*
|
|
@@ -605,6 +663,19 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
605
663
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
606
664
|
*/
|
|
607
665
|
deleteABTest({ id }: DeleteABTestProps, requestOptions?: RequestOptions): Promise<ABTestResponse>;
|
|
666
|
+
/**
|
|
667
|
+
* Deletes an A/B test by its ID.
|
|
668
|
+
*
|
|
669
|
+
* 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.
|
|
670
|
+
*
|
|
671
|
+
* Required API Key ACLs:
|
|
672
|
+
* - editSettings
|
|
673
|
+
* @param deleteABTest - The deleteABTest object.
|
|
674
|
+
* @param deleteABTest.id - Unique A/B test identifier.
|
|
675
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
676
|
+
* @see deleteABTest for the plain version.
|
|
677
|
+
*/
|
|
678
|
+
deleteABTestWithHTTPInfo({ id }: DeleteABTestProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<ABTestResponse>>;
|
|
608
679
|
/**
|
|
609
680
|
* Given the traffic percentage and the expected effect size, this endpoint estimates the sample size and duration of an A/B test based on historical traffic.
|
|
610
681
|
*
|
|
@@ -614,6 +685,18 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
614
685
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
615
686
|
*/
|
|
616
687
|
estimateABTest(estimateABTestRequest: EstimateABTestRequest, requestOptions?: RequestOptions): Promise<EstimateABTestResponse>;
|
|
688
|
+
/**
|
|
689
|
+
* Given the traffic percentage and the expected effect size, this endpoint estimates the sample size and duration of an A/B test based on historical traffic.
|
|
690
|
+
*
|
|
691
|
+
* 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.
|
|
692
|
+
*
|
|
693
|
+
* Required API Key ACLs:
|
|
694
|
+
* - analytics
|
|
695
|
+
* @param estimateABTestRequest - The estimateABTestRequest object.
|
|
696
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
697
|
+
* @see estimateABTest for the plain version.
|
|
698
|
+
*/
|
|
699
|
+
estimateABTestWithHTTPInfo(estimateABTestRequest: EstimateABTestRequest, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<EstimateABTestResponse>>;
|
|
617
700
|
/**
|
|
618
701
|
* Retrieves the details for an A/B test by its ID.
|
|
619
702
|
*
|
|
@@ -624,6 +707,19 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
624
707
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
625
708
|
*/
|
|
626
709
|
getABTest({ id }: GetABTestProps, requestOptions?: RequestOptions): Promise<ABTest>;
|
|
710
|
+
/**
|
|
711
|
+
* Retrieves the details for an A/B test by its ID.
|
|
712
|
+
*
|
|
713
|
+
* 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.
|
|
714
|
+
*
|
|
715
|
+
* Required API Key ACLs:
|
|
716
|
+
* - analytics
|
|
717
|
+
* @param getABTest - The getABTest object.
|
|
718
|
+
* @param getABTest.id - Unique A/B test identifier.
|
|
719
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
720
|
+
* @see getABTest for the plain version.
|
|
721
|
+
*/
|
|
722
|
+
getABTestWithHTTPInfo({ id }: GetABTestProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<ABTest>>;
|
|
627
723
|
/**
|
|
628
724
|
* Retrieves timeseries for an A/B test by its ID.
|
|
629
725
|
*
|
|
@@ -637,6 +733,22 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
637
733
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
638
734
|
*/
|
|
639
735
|
getTimeseries({ id, startDate, endDate, metric }: GetTimeseriesProps, requestOptions?: RequestOptions): Promise<Timeseries>;
|
|
736
|
+
/**
|
|
737
|
+
* Retrieves timeseries for an A/B test by its ID.
|
|
738
|
+
*
|
|
739
|
+
* 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.
|
|
740
|
+
*
|
|
741
|
+
* Required API Key ACLs:
|
|
742
|
+
* - analytics
|
|
743
|
+
* @param getTimeseries - The getTimeseries object.
|
|
744
|
+
* @param getTimeseries.id - Unique A/B test identifier.
|
|
745
|
+
* @param getTimeseries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
746
|
+
* @param getTimeseries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
747
|
+
* @param getTimeseries.metric - List of metrics to retrieve. If not specified, all metrics are returned.
|
|
748
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
749
|
+
* @see getTimeseries for the plain version.
|
|
750
|
+
*/
|
|
751
|
+
getTimeseriesWithHTTPInfo({ id, startDate, endDate, metric }: GetTimeseriesProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<Timeseries>>;
|
|
640
752
|
/**
|
|
641
753
|
* Lists all A/B tests you configured for this application.
|
|
642
754
|
*
|
|
@@ -651,6 +763,23 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
651
763
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
652
764
|
*/
|
|
653
765
|
listABTests({ offset, limit, indexPrefix, indexSuffix, direction }?: ListABTestsProps, requestOptions?: RequestOptions | undefined): Promise<ListABTestsResponse>;
|
|
766
|
+
/**
|
|
767
|
+
* Lists all A/B tests you configured for this application.
|
|
768
|
+
*
|
|
769
|
+
* 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.
|
|
770
|
+
*
|
|
771
|
+
* Required API Key ACLs:
|
|
772
|
+
* - analytics
|
|
773
|
+
* @param listABTests - The listABTests object.
|
|
774
|
+
* @param listABTests.offset - Position of the first item to return.
|
|
775
|
+
* @param listABTests.limit - Number of items to return.
|
|
776
|
+
* @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.
|
|
777
|
+
* @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.
|
|
778
|
+
* @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.
|
|
779
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
780
|
+
* @see listABTests for the plain version.
|
|
781
|
+
*/
|
|
782
|
+
listABTestsWithHTTPInfo({ offset, limit, indexPrefix, indexSuffix, direction }?: ListABTestsProps, requestOptions?: RequestOptions | undefined): Promise<AlgoliaHttpResponse<ListABTestsResponse>>;
|
|
654
783
|
/**
|
|
655
784
|
* Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
|
|
656
785
|
*
|
|
@@ -661,6 +790,19 @@ declare function createAbtestingV3Client({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
661
790
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
662
791
|
*/
|
|
663
792
|
stopABTest({ id }: StopABTestProps, requestOptions?: RequestOptions): Promise<ABTestResponse>;
|
|
793
|
+
/**
|
|
794
|
+
* Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
|
|
795
|
+
*
|
|
796
|
+
* 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.
|
|
797
|
+
*
|
|
798
|
+
* Required API Key ACLs:
|
|
799
|
+
* - editSettings
|
|
800
|
+
* @param stopABTest - The stopABTest object.
|
|
801
|
+
* @param stopABTest.id - Unique A/B test identifier.
|
|
802
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
803
|
+
* @see stopABTest for the plain version.
|
|
804
|
+
*/
|
|
805
|
+
stopABTestWithHTTPInfo({ id }: StopABTestProps, requestOptions?: RequestOptions): Promise<AlgoliaHttpResponse<ABTestResponse>>;
|
|
664
806
|
};
|
|
665
807
|
|
|
666
808
|
/**
|
package/dist/builds/browser.js
CHANGED
|
@@ -9,7 +9,7 @@ import { createXhrRequester } from "@algolia/requester-browser-xhr";
|
|
|
9
9
|
|
|
10
10
|
// src/abtestingV3Client.ts
|
|
11
11
|
import { createAuth, createTransporter, getAlgoliaAgent, validateRequired } from "@algolia/client-common";
|
|
12
|
-
var apiClientVersion = "1.
|
|
12
|
+
var apiClientVersion = "1.22.0";
|
|
13
13
|
var REGIONS = ["de", "us"];
|
|
14
14
|
function getDefaultHosts(region) {
|
|
15
15
|
const url = !region ? "analytics.algolia.com" : "analytics.{region}.algolia.com".replace("{region}", region);
|
|
@@ -112,6 +112,35 @@ function createAbtestingV3Client({
|
|
|
112
112
|
};
|
|
113
113
|
return transporter.request(request, requestOptions);
|
|
114
114
|
},
|
|
115
|
+
/**
|
|
116
|
+
* Creates a new A/B test.
|
|
117
|
+
*
|
|
118
|
+
* 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.
|
|
119
|
+
*
|
|
120
|
+
* Required API Key ACLs:
|
|
121
|
+
* - editSettings
|
|
122
|
+
* @param addABTestsRequest - The addABTestsRequest object.
|
|
123
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
124
|
+
* @see addABTests for the plain version.
|
|
125
|
+
*/
|
|
126
|
+
addABTestsWithHTTPInfo(addABTestsRequest, requestOptions) {
|
|
127
|
+
validateRequired("addABTestsRequest", "addABTestsWithHTTPInfo", addABTestsRequest);
|
|
128
|
+
validateRequired("addABTestsRequest.name", "addABTestsWithHTTPInfo", addABTestsRequest.name);
|
|
129
|
+
validateRequired("addABTestsRequest.variants", "addABTestsWithHTTPInfo", addABTestsRequest.variants);
|
|
130
|
+
validateRequired("addABTestsRequest.metrics", "addABTestsWithHTTPInfo", addABTestsRequest.metrics);
|
|
131
|
+
validateRequired("addABTestsRequest.endAt", "addABTestsWithHTTPInfo", addABTestsRequest.endAt);
|
|
132
|
+
const requestPath = "/3/abtests";
|
|
133
|
+
const headers = {};
|
|
134
|
+
const queryParameters = {};
|
|
135
|
+
const request = {
|
|
136
|
+
method: "POST",
|
|
137
|
+
path: requestPath,
|
|
138
|
+
queryParameters,
|
|
139
|
+
headers,
|
|
140
|
+
data: addABTestsRequest
|
|
141
|
+
};
|
|
142
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
143
|
+
},
|
|
115
144
|
/**
|
|
116
145
|
* This method lets you send requests to the Algolia REST API.
|
|
117
146
|
* @param customDelete - The customDelete object.
|
|
@@ -132,6 +161,29 @@ function createAbtestingV3Client({
|
|
|
132
161
|
};
|
|
133
162
|
return transporter.request(request, requestOptions);
|
|
134
163
|
},
|
|
164
|
+
/**
|
|
165
|
+
* This method lets you send requests to the Algolia REST API.
|
|
166
|
+
*
|
|
167
|
+
* 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.
|
|
168
|
+
* @param customDelete - The customDelete object.
|
|
169
|
+
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
170
|
+
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
171
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
172
|
+
* @see customDelete for the plain version.
|
|
173
|
+
*/
|
|
174
|
+
customDeleteWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
175
|
+
validateRequired("path", "customDeleteWithHTTPInfo", path);
|
|
176
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
177
|
+
const headers = {};
|
|
178
|
+
const queryParameters = parameters ? parameters : {};
|
|
179
|
+
const request = {
|
|
180
|
+
method: "DELETE",
|
|
181
|
+
path: requestPath,
|
|
182
|
+
queryParameters,
|
|
183
|
+
headers
|
|
184
|
+
};
|
|
185
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
186
|
+
},
|
|
135
187
|
/**
|
|
136
188
|
* This method lets you send requests to the Algolia REST API.
|
|
137
189
|
* @param customGet - The customGet object.
|
|
@@ -152,6 +204,29 @@ function createAbtestingV3Client({
|
|
|
152
204
|
};
|
|
153
205
|
return transporter.request(request, requestOptions);
|
|
154
206
|
},
|
|
207
|
+
/**
|
|
208
|
+
* This method lets you send requests to the Algolia REST API.
|
|
209
|
+
*
|
|
210
|
+
* 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.
|
|
211
|
+
* @param customGet - The customGet object.
|
|
212
|
+
* @param customGet.path - Path of the endpoint, for example `1/newFeature`.
|
|
213
|
+
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
214
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
215
|
+
* @see customGet for the plain version.
|
|
216
|
+
*/
|
|
217
|
+
customGetWithHTTPInfo({ path, parameters }, requestOptions) {
|
|
218
|
+
validateRequired("path", "customGetWithHTTPInfo", path);
|
|
219
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
220
|
+
const headers = {};
|
|
221
|
+
const queryParameters = parameters ? parameters : {};
|
|
222
|
+
const request = {
|
|
223
|
+
method: "GET",
|
|
224
|
+
path: requestPath,
|
|
225
|
+
queryParameters,
|
|
226
|
+
headers
|
|
227
|
+
};
|
|
228
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
229
|
+
},
|
|
155
230
|
/**
|
|
156
231
|
* This method lets you send requests to the Algolia REST API.
|
|
157
232
|
* @param customPost - The customPost object.
|
|
@@ -174,6 +249,31 @@ function createAbtestingV3Client({
|
|
|
174
249
|
};
|
|
175
250
|
return transporter.request(request, requestOptions);
|
|
176
251
|
},
|
|
252
|
+
/**
|
|
253
|
+
* This method lets you send requests to the Algolia REST API.
|
|
254
|
+
*
|
|
255
|
+
* 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.
|
|
256
|
+
* @param customPost - The customPost object.
|
|
257
|
+
* @param customPost.path - Path of the endpoint, for example `1/newFeature`.
|
|
258
|
+
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
259
|
+
* @param customPost.body - Parameters to send with the custom request.
|
|
260
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
261
|
+
* @see customPost for the plain version.
|
|
262
|
+
*/
|
|
263
|
+
customPostWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
264
|
+
validateRequired("path", "customPostWithHTTPInfo", path);
|
|
265
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
266
|
+
const headers = {};
|
|
267
|
+
const queryParameters = parameters ? parameters : {};
|
|
268
|
+
const request = {
|
|
269
|
+
method: "POST",
|
|
270
|
+
path: requestPath,
|
|
271
|
+
queryParameters,
|
|
272
|
+
headers,
|
|
273
|
+
data: body ? body : {}
|
|
274
|
+
};
|
|
275
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
276
|
+
},
|
|
177
277
|
/**
|
|
178
278
|
* This method lets you send requests to the Algolia REST API.
|
|
179
279
|
* @param customPut - The customPut object.
|
|
@@ -196,6 +296,31 @@ function createAbtestingV3Client({
|
|
|
196
296
|
};
|
|
197
297
|
return transporter.request(request, requestOptions);
|
|
198
298
|
},
|
|
299
|
+
/**
|
|
300
|
+
* This method lets you send requests to the Algolia REST API.
|
|
301
|
+
*
|
|
302
|
+
* 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.
|
|
303
|
+
* @param customPut - The customPut object.
|
|
304
|
+
* @param customPut.path - Path of the endpoint, for example `1/newFeature`.
|
|
305
|
+
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
306
|
+
* @param customPut.body - Parameters to send with the custom request.
|
|
307
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
308
|
+
* @see customPut for the plain version.
|
|
309
|
+
*/
|
|
310
|
+
customPutWithHTTPInfo({ path, parameters, body }, requestOptions) {
|
|
311
|
+
validateRequired("path", "customPutWithHTTPInfo", path);
|
|
312
|
+
const requestPath = "/{path}".replace("{path}", path);
|
|
313
|
+
const headers = {};
|
|
314
|
+
const queryParameters = parameters ? parameters : {};
|
|
315
|
+
const request = {
|
|
316
|
+
method: "PUT",
|
|
317
|
+
path: requestPath,
|
|
318
|
+
queryParameters,
|
|
319
|
+
headers,
|
|
320
|
+
data: body ? body : {}
|
|
321
|
+
};
|
|
322
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
323
|
+
},
|
|
199
324
|
/**
|
|
200
325
|
* Deletes an A/B test by its ID.
|
|
201
326
|
*
|
|
@@ -218,6 +343,31 @@ function createAbtestingV3Client({
|
|
|
218
343
|
};
|
|
219
344
|
return transporter.request(request, requestOptions);
|
|
220
345
|
},
|
|
346
|
+
/**
|
|
347
|
+
* Deletes an A/B test by its ID.
|
|
348
|
+
*
|
|
349
|
+
* 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.
|
|
350
|
+
*
|
|
351
|
+
* Required API Key ACLs:
|
|
352
|
+
* - editSettings
|
|
353
|
+
* @param deleteABTest - The deleteABTest object.
|
|
354
|
+
* @param deleteABTest.id - Unique A/B test identifier.
|
|
355
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
356
|
+
* @see deleteABTest for the plain version.
|
|
357
|
+
*/
|
|
358
|
+
deleteABTestWithHTTPInfo({ id }, requestOptions) {
|
|
359
|
+
validateRequired("id", "deleteABTestWithHTTPInfo", id);
|
|
360
|
+
const requestPath = "/3/abtests/{id}".replace("{id}", encodeURIComponent(id));
|
|
361
|
+
const headers = {};
|
|
362
|
+
const queryParameters = {};
|
|
363
|
+
const request = {
|
|
364
|
+
method: "DELETE",
|
|
365
|
+
path: requestPath,
|
|
366
|
+
queryParameters,
|
|
367
|
+
headers
|
|
368
|
+
};
|
|
369
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
370
|
+
},
|
|
221
371
|
/**
|
|
222
372
|
* Given the traffic percentage and the expected effect size, this endpoint estimates the sample size and duration of an A/B test based on historical traffic.
|
|
223
373
|
*
|
|
@@ -242,6 +392,37 @@ function createAbtestingV3Client({
|
|
|
242
392
|
};
|
|
243
393
|
return transporter.request(request, requestOptions);
|
|
244
394
|
},
|
|
395
|
+
/**
|
|
396
|
+
* Given the traffic percentage and the expected effect size, this endpoint estimates the sample size and duration of an A/B test based on historical traffic.
|
|
397
|
+
*
|
|
398
|
+
* 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.
|
|
399
|
+
*
|
|
400
|
+
* Required API Key ACLs:
|
|
401
|
+
* - analytics
|
|
402
|
+
* @param estimateABTestRequest - The estimateABTestRequest object.
|
|
403
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
404
|
+
* @see estimateABTest for the plain version.
|
|
405
|
+
*/
|
|
406
|
+
estimateABTestWithHTTPInfo(estimateABTestRequest, requestOptions) {
|
|
407
|
+
validateRequired("estimateABTestRequest", "estimateABTestWithHTTPInfo", estimateABTestRequest);
|
|
408
|
+
validateRequired(
|
|
409
|
+
"estimateABTestRequest.configuration",
|
|
410
|
+
"estimateABTestWithHTTPInfo",
|
|
411
|
+
estimateABTestRequest.configuration
|
|
412
|
+
);
|
|
413
|
+
validateRequired("estimateABTestRequest.variants", "estimateABTestWithHTTPInfo", estimateABTestRequest.variants);
|
|
414
|
+
const requestPath = "/3/abtests/estimate";
|
|
415
|
+
const headers = {};
|
|
416
|
+
const queryParameters = {};
|
|
417
|
+
const request = {
|
|
418
|
+
method: "POST",
|
|
419
|
+
path: requestPath,
|
|
420
|
+
queryParameters,
|
|
421
|
+
headers,
|
|
422
|
+
data: estimateABTestRequest
|
|
423
|
+
};
|
|
424
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
425
|
+
},
|
|
245
426
|
/**
|
|
246
427
|
* Retrieves the details for an A/B test by its ID.
|
|
247
428
|
*
|
|
@@ -264,6 +445,31 @@ function createAbtestingV3Client({
|
|
|
264
445
|
};
|
|
265
446
|
return transporter.request(request, requestOptions);
|
|
266
447
|
},
|
|
448
|
+
/**
|
|
449
|
+
* Retrieves the details for an A/B test by its ID.
|
|
450
|
+
*
|
|
451
|
+
* 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.
|
|
452
|
+
*
|
|
453
|
+
* Required API Key ACLs:
|
|
454
|
+
* - analytics
|
|
455
|
+
* @param getABTest - The getABTest object.
|
|
456
|
+
* @param getABTest.id - Unique A/B test identifier.
|
|
457
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
458
|
+
* @see getABTest for the plain version.
|
|
459
|
+
*/
|
|
460
|
+
getABTestWithHTTPInfo({ id }, requestOptions) {
|
|
461
|
+
validateRequired("id", "getABTestWithHTTPInfo", id);
|
|
462
|
+
const requestPath = "/3/abtests/{id}".replace("{id}", encodeURIComponent(id));
|
|
463
|
+
const headers = {};
|
|
464
|
+
const queryParameters = {};
|
|
465
|
+
const request = {
|
|
466
|
+
method: "GET",
|
|
467
|
+
path: requestPath,
|
|
468
|
+
queryParameters,
|
|
469
|
+
headers
|
|
470
|
+
};
|
|
471
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
472
|
+
},
|
|
267
473
|
/**
|
|
268
474
|
* Retrieves timeseries for an A/B test by its ID.
|
|
269
475
|
*
|
|
@@ -298,6 +504,43 @@ function createAbtestingV3Client({
|
|
|
298
504
|
};
|
|
299
505
|
return transporter.request(request, requestOptions);
|
|
300
506
|
},
|
|
507
|
+
/**
|
|
508
|
+
* Retrieves timeseries for an A/B test by its ID.
|
|
509
|
+
*
|
|
510
|
+
* 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.
|
|
511
|
+
*
|
|
512
|
+
* Required API Key ACLs:
|
|
513
|
+
* - analytics
|
|
514
|
+
* @param getTimeseries - The getTimeseries object.
|
|
515
|
+
* @param getTimeseries.id - Unique A/B test identifier.
|
|
516
|
+
* @param getTimeseries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
517
|
+
* @param getTimeseries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
518
|
+
* @param getTimeseries.metric - List of metrics to retrieve. If not specified, all metrics are returned.
|
|
519
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
520
|
+
* @see getTimeseries for the plain version.
|
|
521
|
+
*/
|
|
522
|
+
getTimeseriesWithHTTPInfo({ id, startDate, endDate, metric }, requestOptions) {
|
|
523
|
+
validateRequired("id", "getTimeseriesWithHTTPInfo", id);
|
|
524
|
+
const requestPath = "/3/abtests/{id}/timeseries".replace("{id}", encodeURIComponent(id));
|
|
525
|
+
const headers = {};
|
|
526
|
+
const queryParameters = {};
|
|
527
|
+
if (startDate !== void 0) {
|
|
528
|
+
queryParameters["startDate"] = startDate.toString();
|
|
529
|
+
}
|
|
530
|
+
if (endDate !== void 0) {
|
|
531
|
+
queryParameters["endDate"] = endDate.toString();
|
|
532
|
+
}
|
|
533
|
+
if (metric !== void 0) {
|
|
534
|
+
queryParameters["metric"] = metric.toString();
|
|
535
|
+
}
|
|
536
|
+
const request = {
|
|
537
|
+
method: "GET",
|
|
538
|
+
path: requestPath,
|
|
539
|
+
queryParameters,
|
|
540
|
+
headers
|
|
541
|
+
};
|
|
542
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
543
|
+
},
|
|
301
544
|
/**
|
|
302
545
|
* Lists all A/B tests you configured for this application.
|
|
303
546
|
*
|
|
@@ -338,6 +581,49 @@ function createAbtestingV3Client({
|
|
|
338
581
|
};
|
|
339
582
|
return transporter.request(request, requestOptions);
|
|
340
583
|
},
|
|
584
|
+
/**
|
|
585
|
+
* Lists all A/B tests you configured for this application.
|
|
586
|
+
*
|
|
587
|
+
* 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.
|
|
588
|
+
*
|
|
589
|
+
* Required API Key ACLs:
|
|
590
|
+
* - analytics
|
|
591
|
+
* @param listABTests - The listABTests object.
|
|
592
|
+
* @param listABTests.offset - Position of the first item to return.
|
|
593
|
+
* @param listABTests.limit - Number of items to return.
|
|
594
|
+
* @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.
|
|
595
|
+
* @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.
|
|
596
|
+
* @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.
|
|
597
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
598
|
+
* @see listABTests for the plain version.
|
|
599
|
+
*/
|
|
600
|
+
listABTestsWithHTTPInfo({ offset, limit, indexPrefix, indexSuffix, direction } = {}, requestOptions = void 0) {
|
|
601
|
+
const requestPath = "/3/abtests";
|
|
602
|
+
const headers = {};
|
|
603
|
+
const queryParameters = {};
|
|
604
|
+
if (offset !== void 0) {
|
|
605
|
+
queryParameters["offset"] = offset.toString();
|
|
606
|
+
}
|
|
607
|
+
if (limit !== void 0) {
|
|
608
|
+
queryParameters["limit"] = limit.toString();
|
|
609
|
+
}
|
|
610
|
+
if (indexPrefix !== void 0) {
|
|
611
|
+
queryParameters["indexPrefix"] = indexPrefix.toString();
|
|
612
|
+
}
|
|
613
|
+
if (indexSuffix !== void 0) {
|
|
614
|
+
queryParameters["indexSuffix"] = indexSuffix.toString();
|
|
615
|
+
}
|
|
616
|
+
if (direction !== void 0) {
|
|
617
|
+
queryParameters["direction"] = direction.toString();
|
|
618
|
+
}
|
|
619
|
+
const request = {
|
|
620
|
+
method: "GET",
|
|
621
|
+
path: requestPath,
|
|
622
|
+
queryParameters,
|
|
623
|
+
headers
|
|
624
|
+
};
|
|
625
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
626
|
+
},
|
|
341
627
|
/**
|
|
342
628
|
* Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
|
|
343
629
|
*
|
|
@@ -359,6 +645,31 @@ function createAbtestingV3Client({
|
|
|
359
645
|
headers
|
|
360
646
|
};
|
|
361
647
|
return transporter.request(request, requestOptions);
|
|
648
|
+
},
|
|
649
|
+
/**
|
|
650
|
+
* Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
|
|
651
|
+
*
|
|
652
|
+
* 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.
|
|
653
|
+
*
|
|
654
|
+
* Required API Key ACLs:
|
|
655
|
+
* - editSettings
|
|
656
|
+
* @param stopABTest - The stopABTest object.
|
|
657
|
+
* @param stopABTest.id - Unique A/B test identifier.
|
|
658
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
659
|
+
* @see stopABTest for the plain version.
|
|
660
|
+
*/
|
|
661
|
+
stopABTestWithHTTPInfo({ id }, requestOptions) {
|
|
662
|
+
validateRequired("id", "stopABTestWithHTTPInfo", id);
|
|
663
|
+
const requestPath = "/3/abtests/{id}/stop".replace("{id}", encodeURIComponent(id));
|
|
664
|
+
const headers = {};
|
|
665
|
+
const queryParameters = {};
|
|
666
|
+
const request = {
|
|
667
|
+
method: "POST",
|
|
668
|
+
path: requestPath,
|
|
669
|
+
queryParameters,
|
|
670
|
+
headers
|
|
671
|
+
};
|
|
672
|
+
return transporter.requestWithHttpInfo(request, requestOptions);
|
|
362
673
|
}
|
|
363
674
|
};
|
|
364
675
|
}
|