algoliasearch 5.0.0 → 5.1.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.
Files changed (32) hide show
  1. package/README.md +74 -0
  2. package/dist/algoliasearch/builds/browser.d.ts +6 -6
  3. package/dist/algoliasearch/builds/node.d.ts +6 -6
  4. package/dist/algoliasearch.cjs +65 -28
  5. package/dist/algoliasearch.esm.browser.js +65 -28
  6. package/dist/algoliasearch.esm.node.js +65 -28
  7. package/dist/algoliasearch.umd.js +2 -2
  8. package/dist/client-abtesting/model/index.d.ts +2 -0
  9. package/dist/client-abtesting/model/index.d.ts.map +1 -1
  10. package/dist/client-abtesting/model/scheduleABTestResponse.d.ts +7 -0
  11. package/dist/client-abtesting/model/scheduleABTestResponse.d.ts.map +1 -0
  12. package/dist/client-abtesting/model/scheduleABTestsRequest.d.ts +20 -0
  13. package/dist/client-abtesting/model/scheduleABTestsRequest.d.ts.map +1 -0
  14. package/dist/client-abtesting/src/abtestingClient.d.ts +13 -1
  15. package/dist/client-abtesting/src/abtestingClient.d.ts.map +1 -1
  16. package/dist/client-analytics/src/analyticsClient.d.ts +1 -1
  17. package/dist/client-personalization/src/personalizationClient.d.ts +1 -1
  18. package/dist/client-search/src/searchClient.d.ts +24 -24
  19. package/dist/client-search/src/searchClient.d.ts.map +1 -1
  20. package/dist/lite/builds/browser.d.ts +6 -0
  21. package/dist/lite/builds/browser.d.ts.map +1 -1
  22. package/dist/lite/builds/node.d.ts +6 -0
  23. package/dist/lite/builds/node.d.ts.map +1 -1
  24. package/dist/lite/lite.cjs +23 -1
  25. package/dist/lite/lite.esm.browser.js +23 -1
  26. package/dist/lite/lite.esm.node.js +23 -1
  27. package/dist/lite/lite.umd.js +2 -2
  28. package/dist/lite/src/liteClient.d.ts +25 -1
  29. package/dist/lite/src/liteClient.d.ts.map +1 -1
  30. package/dist/recommend/src/recommendClient.d.ts +1 -1
  31. package/lite/src/liteClient.ts +36 -1
  32. package/package.json +9 -9
package/README.md ADDED
@@ -0,0 +1,74 @@
1
+ <p align="center">
2
+ <a href="https://www.algolia.com">
3
+ <img alt="Algolia for JavaScript" src="https://raw.githubusercontent.com/algolia/algoliasearch-client-common/master/banners/javascript.png" >
4
+ </a>
5
+
6
+ <h4 align="center">The perfect starting point to integrate <a href="https://algolia.com" target="_blank">Algolia</a> within your JavaScript project</h4>
7
+
8
+ <p align="center">
9
+ <a href="https://npmjs.org/package/algoliasearch"><img src="https://img.shields.io/npm/v/algoliasearch.svg?style=flat-square" alt="NPM version"></img></a>
10
+ <a href="http://npm-stat.com/charts.html?package=algoliasearch"><img src="https://img.shields.io/npm/dm/algoliasearch.svg?style=flat-square" alt="NPM downloads"></a>
11
+ <a href="https://www.jsdelivr.com/package/npm/algoliasearch"><img src="https://data.jsdelivr.com/v1/package/npm/algoliasearch/badge" alt="jsDelivr Downloads"></img></a>
12
+ <a href="LICENSE.md"><img src="https://img.shields.io/badge/license-MIT-green.svg?style=flat-square" alt="License"></a>
13
+ </p>
14
+ </p>
15
+
16
+ <p align="center">
17
+ <a href="https://www.algolia.com/doc/api-client/getting-started/install/javascript/" target="_blank">Documentation</a> •
18
+ <a href="https://www.algolia.com/doc/guides/building-search-ui/what-is-instantsearch/js/" target="_blank">InstantSearch</a> •
19
+ <a href="https://discourse.algolia.com" target="_blank">Community Forum</a> •
20
+ <a href="http://stackoverflow.com/questions/tagged/algolia" target="_blank">Stack Overflow</a> •
21
+ <a href="https://github.com/algolia/algoliasearch-client-javascript/issues" target="_blank">Report a bug</a> •
22
+ <a href="https://www.algolia.com/doc/api-client/troubleshooting/faq/javascript/" target="_blank">FAQ</a> •
23
+ <a href="https://alg.li/support" target="_blank">Support</a>
24
+ </p>
25
+
26
+ ## ✨ Features
27
+
28
+ - Thin & **minimal low-level HTTP client** to interact with Algolia's API
29
+ - Works both on the **browser** and **node.js**
30
+ - **UMD and ESM compatible**, you can use it with any module loader
31
+ - Built with TypeScript
32
+
33
+ ## 💡 Getting Started
34
+
35
+ To get started, you first need to install algoliasearch (or any other available API client package).
36
+
37
+ All of our clients comes with type definition, and are available for both browser and node environments.
38
+
39
+ ```bash
40
+ yarn add algoliasearch
41
+ # or
42
+ npm install algoliasearch
43
+ ```
44
+
45
+ Without a package manager
46
+
47
+ Add the following JavaScript snippet to the <head> of your website:
48
+
49
+ ```html
50
+ <script src="https://cdn.jsdelivr.net/npm/algoliasearch/dist/algoliasearch.umd.min.js"></script>
51
+ ```
52
+
53
+ You can now import the Algolia API client in your project and play with it.
54
+
55
+ ```js
56
+ import { algoliasearch } from 'algoliasearch';
57
+
58
+ const client = algoliasearch('YOUR_APP_ID', 'YOUR_API_KEY');
59
+
60
+ // or with the lite client
61
+ import { liteClient } from 'algoliasearch/lite';
62
+
63
+ const client = liteClient('YOUR_APP_ID', 'YOUR_API_KEY');
64
+ ```
65
+
66
+ For full documentation, visit the **[Algolia JavaScript API Client](https://www.algolia.com/doc/api-client/getting-started/install/javascript/)**.
67
+
68
+ ## ❓ Troubleshooting
69
+
70
+ Encountering an issue? Before reaching out to support, we recommend heading to our [FAQ](https://www.algolia.com/doc/api-client/troubleshooting/faq/javascript/) where you will find answers for the most common issues and gotchas with the client. You can also open [a GitHub issue](https://github.com/algolia/api-clients-automation/issues/new?assignees=&labels=&projects=&template=Bug_report.md)
71
+
72
+ ## 📄 License
73
+
74
+ The Algolia JavaScript API Client is an open-sourced software licensed under the [MIT license](LICENSE).
@@ -8,7 +8,7 @@ import type { Region as PersonalizationRegion } from '@algolia/client-personaliz
8
8
  import type { RecommendClient } from '@algolia/recommend';
9
9
  import type { InitClientOptions, InitClientRegion } from './models';
10
10
  export * from './models';
11
- export declare const apiClientVersion = "5.0.0";
11
+ export declare const apiClientVersion = "5.1.0";
12
12
  /**
13
13
  * The client type.
14
14
  */
@@ -29,17 +29,17 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
29
29
  browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: import("@algolia/client-search/model/clientMethodProps").BrowseOptions<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>> & import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
30
30
  browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: import("@algolia/client-search/model/clientMethodProps").BrowseOptions<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse> & import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
31
31
  browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }: import("@algolia/client-search/model/clientMethodProps").BrowseOptions<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse> & import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
32
+ chunkedBatch({ indexName, objects, action, waitForTasks, batchSize, }: import("@algolia/client-search/model/clientMethodProps").ChunkedBatchOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
33
+ saveObjects({ indexName, objects }: import("@algolia/client-search/model/clientMethodProps").SaveObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
34
+ deleteObjects({ indexName, objectIDs }: import("@algolia/client-search/model/clientMethodProps").DeleteObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
35
+ partialUpdateObjects({ indexName, objects, createIfNotExists }: import("@algolia/client-search/model/clientMethodProps").PartialUpdateObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
36
+ replaceAllObjects({ indexName, objects, batchSize }: import("@algolia/client-search/model/clientMethodProps").ReplaceAllObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/replaceAllObjectsResponse").ReplaceAllObjectsResponse>;
32
37
  searchForHits<T>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<{
33
38
  results: Array<import("@algolia/client-search/model/searchResponse").SearchResponse<T>>;
34
39
  }>;
35
40
  searchForFacets(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<{
36
41
  results: import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse[];
37
42
  }>;
38
- chunkedBatch({ indexName, objects, action, waitForTasks, batchSize, }: import("@algolia/client-search/model/clientMethodProps").ChunkedBatchOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
39
- saveObjects({ indexName, objects }: import("@algolia/client-search/model/clientMethodProps").SaveObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
40
- deleteObjects({ indexName, objectIDs }: import("@algolia/client-search/model/clientMethodProps").DeleteObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
41
- partialUpdateObjects({ indexName, objects, createIfNotExists }: import("@algolia/client-search/model/clientMethodProps").PartialUpdateObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
42
- replaceAllObjects({ indexName, objects, batchSize }: import("@algolia/client-search/model/clientMethodProps").ReplaceAllObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/replaceAllObjectsResponse").ReplaceAllObjectsResponse>;
43
43
  addApiKey(apiKey: import("@algolia/client-search/model/apiKey").ApiKey, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
44
44
  addOrUpdateObject({ indexName, objectID, body }: import("@algolia/client-search/model/clientMethodProps").AddOrUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
45
45
  appendSource(source: import("@algolia/client-search/model/source").Source, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
@@ -8,7 +8,7 @@ import type { Region as PersonalizationRegion } from '@algolia/client-personaliz
8
8
  import type { RecommendClient } from '@algolia/recommend';
9
9
  import type { InitClientOptions, InitClientRegion, GenerateSecuredApiKeyOptions, GetSecuredApiKeyRemainingValidityOptions } from './models';
10
10
  export * from './models';
11
- export declare const apiClientVersion = "5.0.0";
11
+ export declare const apiClientVersion = "5.1.0";
12
12
  /**
13
13
  * The client type.
14
14
  */
@@ -46,17 +46,17 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
46
46
  browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: import("@algolia/client-search/model/clientMethodProps").BrowseOptions<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>> & import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
47
47
  browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: import("@algolia/client-search/model/clientMethodProps").BrowseOptions<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse> & import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
48
48
  browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }: import("@algolia/client-search/model/clientMethodProps").BrowseOptions<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse> & import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
49
+ chunkedBatch({ indexName, objects, action, waitForTasks, batchSize, }: import("@algolia/client-search/model/clientMethodProps").ChunkedBatchOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
50
+ saveObjects({ indexName, objects }: import("@algolia/client-search/model/clientMethodProps").SaveObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
51
+ deleteObjects({ indexName, objectIDs }: import("@algolia/client-search/model/clientMethodProps").DeleteObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
52
+ partialUpdateObjects({ indexName, objects, createIfNotExists }: import("@algolia/client-search/model/clientMethodProps").PartialUpdateObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
53
+ replaceAllObjects({ indexName, objects, batchSize }: import("@algolia/client-search/model/clientMethodProps").ReplaceAllObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/replaceAllObjectsResponse").ReplaceAllObjectsResponse>;
49
54
  searchForHits<T>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<{
50
55
  results: Array<import("@algolia/client-search/model/searchResponse").SearchResponse<T>>;
51
56
  }>;
52
57
  searchForFacets(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<{
53
58
  results: import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse[];
54
59
  }>;
55
- chunkedBatch({ indexName, objects, action, waitForTasks, batchSize, }: import("@algolia/client-search/model/clientMethodProps").ChunkedBatchOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
56
- saveObjects({ indexName, objects }: import("@algolia/client-search/model/clientMethodProps").SaveObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
57
- deleteObjects({ indexName, objectIDs }: import("@algolia/client-search/model/clientMethodProps").DeleteObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
58
- partialUpdateObjects({ indexName, objects, createIfNotExists }: import("@algolia/client-search/model/clientMethodProps").PartialUpdateObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
59
- replaceAllObjects({ indexName, objects, batchSize }: import("@algolia/client-search/model/clientMethodProps").ReplaceAllObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/replaceAllObjectsResponse").ReplaceAllObjectsResponse>;
60
60
  addApiKey(apiKey: import("@algolia/client-search/model/apiKey").ApiKey, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
61
61
  addOrUpdateObject({ indexName, objectID, body }: import("@algolia/client-search/model/clientMethodProps").AddOrUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
62
62
  appendSource(source: import("@algolia/client-search/model/source").Source, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
@@ -5,7 +5,7 @@ var clientCommon = require('@algolia/client-common');
5
5
  var requesterNodeHttp = require('@algolia/requester-node-http');
6
6
 
7
7
  // 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.
8
- const apiClientVersion$5 = '5.0.0';
8
+ const apiClientVersion$5 = '5.1.0';
9
9
  const REGIONS$2 = ['de', 'us'];
10
10
  function getDefaultHosts$4(region) {
11
11
  const url = !region
@@ -281,6 +281,43 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
281
281
  };
282
282
  return transporter.request(request, requestOptions);
283
283
  },
284
+ /**
285
+ * Schedule an A/B test to be started at a later time.
286
+ *
287
+ * Required API Key ACLs:
288
+ * - editSettings.
289
+ *
290
+ * @param scheduleABTestsRequest - The scheduleABTestsRequest object.
291
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
292
+ */
293
+ scheduleABTest(scheduleABTestsRequest, requestOptions) {
294
+ if (!scheduleABTestsRequest) {
295
+ throw new Error('Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.');
296
+ }
297
+ if (!scheduleABTestsRequest.name) {
298
+ throw new Error('Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.');
299
+ }
300
+ if (!scheduleABTestsRequest.variants) {
301
+ throw new Error('Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.');
302
+ }
303
+ if (!scheduleABTestsRequest.scheduledAt) {
304
+ throw new Error('Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.');
305
+ }
306
+ if (!scheduleABTestsRequest.endAt) {
307
+ throw new Error('Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.');
308
+ }
309
+ const requestPath = '/2/abtests/schedule';
310
+ const headers = {};
311
+ const queryParameters = {};
312
+ const request = {
313
+ method: 'POST',
314
+ path: requestPath,
315
+ queryParameters,
316
+ headers,
317
+ data: scheduleABTestsRequest,
318
+ };
319
+ return transporter.request(request, requestOptions);
320
+ },
284
321
  /**
285
322
  * Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
286
323
  *
@@ -310,7 +347,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
310
347
  }
311
348
 
312
349
  // 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.
313
- const apiClientVersion$4 = '5.0.0';
350
+ const apiClientVersion$4 = '5.1.0';
314
351
  const REGIONS$1 = ['de', 'us'];
315
352
  function getDefaultHosts$3(region) {
316
353
  const url = !region
@@ -1365,7 +1402,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1365
1402
  }
1366
1403
 
1367
1404
  // 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.
1368
- const apiClientVersion$3 = '5.0.0';
1405
+ const apiClientVersion$3 = '5.1.0';
1369
1406
  const REGIONS = ['eu', 'us'];
1370
1407
  function getDefaultHosts$2(region) {
1371
1408
  const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
@@ -1626,7 +1663,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1626
1663
  }
1627
1664
 
1628
1665
  // 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.
1629
- const apiClientVersion$2 = '5.0.0';
1666
+ const apiClientVersion$2 = '5.1.0';
1630
1667
  function getDefaultHosts$1(appId) {
1631
1668
  return [
1632
1669
  {
@@ -1904,28 +1941,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1904
1941
  ...browseSynonymsOptions,
1905
1942
  });
1906
1943
  },
1907
- /**
1908
- * Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
1909
- * Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.
1910
- *
1911
- * @summary Search multiple indices for `hits`.
1912
- * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
1913
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1914
- */
1915
- searchForHits(searchMethodParams, requestOptions) {
1916
- return this.search(searchMethodParams, requestOptions);
1917
- },
1918
- /**
1919
- * Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).
1920
- * Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.
1921
- *
1922
- * @summary Search multiple indices for `facets`.
1923
- * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
1924
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1925
- */
1926
- searchForFacets(searchMethodParams, requestOptions) {
1927
- return this.search(searchMethodParams, requestOptions);
1928
- },
1929
1944
  /**
1930
1945
  * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
1931
1946
  *
@@ -2005,7 +2020,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2005
2020
  },
2006
2021
  /**
2007
2022
  * Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
2008
- * See https://api-clients-automation.netlify.app/docs/contributing/add-new-api-client#5-helpers for implementation details.
2023
+ * See https://api-clients-automation.netlify.app/docs/add-new-api-client#5-helpers for implementation details.
2009
2024
  *
2010
2025
  * @summary Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
2011
2026
  * @param replaceAllObjects - The `replaceAllObjects` object.
@@ -2052,6 +2067,28 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2052
2067
  });
2053
2068
  return { copyOperationResponse, batchResponses, moveOperationResponse };
2054
2069
  },
2070
+ /**
2071
+ * Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
2072
+ * Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.
2073
+ *
2074
+ * @summary Search multiple indices for `hits`.
2075
+ * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
2076
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2077
+ */
2078
+ searchForHits(searchMethodParams, requestOptions) {
2079
+ return this.search(searchMethodParams, requestOptions);
2080
+ },
2081
+ /**
2082
+ * Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).
2083
+ * Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.
2084
+ *
2085
+ * @summary Search multiple indices for `facets`.
2086
+ * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
2087
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2088
+ */
2089
+ searchForFacets(searchMethodParams, requestOptions) {
2090
+ return this.search(searchMethodParams, requestOptions);
2091
+ },
2055
2092
  /**
2056
2093
  * Creates a new API key with specific permissions and restrictions.
2057
2094
  *
@@ -3900,7 +3937,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3900
3937
  }
3901
3938
 
3902
3939
  // 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.
3903
- const apiClientVersion$1 = '5.0.0';
3940
+ const apiClientVersion$1 = '5.1.0';
3904
3941
  function getDefaultHosts(appId) {
3905
3942
  return [
3906
3943
  {
@@ -675,7 +675,7 @@ const DEFAULT_READ_TIMEOUT_BROWSER = 2000;
675
675
  const DEFAULT_WRITE_TIMEOUT_BROWSER = 30000;
676
676
 
677
677
  // 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.
678
- const apiClientVersion$5 = '5.0.0';
678
+ const apiClientVersion$5 = '5.1.0';
679
679
  const REGIONS$2 = ['de', 'us'];
680
680
  function getDefaultHosts$4(region) {
681
681
  const url = !region
@@ -951,6 +951,43 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
951
951
  };
952
952
  return transporter.request(request, requestOptions);
953
953
  },
954
+ /**
955
+ * Schedule an A/B test to be started at a later time.
956
+ *
957
+ * Required API Key ACLs:
958
+ * - editSettings.
959
+ *
960
+ * @param scheduleABTestsRequest - The scheduleABTestsRequest object.
961
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
962
+ */
963
+ scheduleABTest(scheduleABTestsRequest, requestOptions) {
964
+ if (!scheduleABTestsRequest) {
965
+ throw new Error('Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.');
966
+ }
967
+ if (!scheduleABTestsRequest.name) {
968
+ throw new Error('Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.');
969
+ }
970
+ if (!scheduleABTestsRequest.variants) {
971
+ throw new Error('Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.');
972
+ }
973
+ if (!scheduleABTestsRequest.scheduledAt) {
974
+ throw new Error('Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.');
975
+ }
976
+ if (!scheduleABTestsRequest.endAt) {
977
+ throw new Error('Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.');
978
+ }
979
+ const requestPath = '/2/abtests/schedule';
980
+ const headers = {};
981
+ const queryParameters = {};
982
+ const request = {
983
+ method: 'POST',
984
+ path: requestPath,
985
+ queryParameters,
986
+ headers,
987
+ data: scheduleABTestsRequest,
988
+ };
989
+ return transporter.request(request, requestOptions);
990
+ },
954
991
  /**
955
992
  * Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
956
993
  *
@@ -980,7 +1017,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
980
1017
  }
981
1018
 
982
1019
  // 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.
983
- const apiClientVersion$4 = '5.0.0';
1020
+ const apiClientVersion$4 = '5.1.0';
984
1021
  const REGIONS$1 = ['de', 'us'];
985
1022
  function getDefaultHosts$3(region) {
986
1023
  const url = !region
@@ -2035,7 +2072,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
2035
2072
  }
2036
2073
 
2037
2074
  // 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.
2038
- const apiClientVersion$3 = '5.0.0';
2075
+ const apiClientVersion$3 = '5.1.0';
2039
2076
  const REGIONS = ['eu', 'us'];
2040
2077
  function getDefaultHosts$2(region) {
2041
2078
  const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
@@ -2296,7 +2333,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
2296
2333
  }
2297
2334
 
2298
2335
  // 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.
2299
- const apiClientVersion$2 = '5.0.0';
2336
+ const apiClientVersion$2 = '5.1.0';
2300
2337
  function getDefaultHosts$1(appId) {
2301
2338
  return [
2302
2339
  {
@@ -2574,28 +2611,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2574
2611
  ...browseSynonymsOptions,
2575
2612
  });
2576
2613
  },
2577
- /**
2578
- * Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
2579
- * Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.
2580
- *
2581
- * @summary Search multiple indices for `hits`.
2582
- * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
2583
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2584
- */
2585
- searchForHits(searchMethodParams, requestOptions) {
2586
- return this.search(searchMethodParams, requestOptions);
2587
- },
2588
- /**
2589
- * Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).
2590
- * Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.
2591
- *
2592
- * @summary Search multiple indices for `facets`.
2593
- * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
2594
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2595
- */
2596
- searchForFacets(searchMethodParams, requestOptions) {
2597
- return this.search(searchMethodParams, requestOptions);
2598
- },
2599
2614
  /**
2600
2615
  * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
2601
2616
  *
@@ -2675,7 +2690,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2675
2690
  },
2676
2691
  /**
2677
2692
  * Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
2678
- * See https://api-clients-automation.netlify.app/docs/contributing/add-new-api-client#5-helpers for implementation details.
2693
+ * See https://api-clients-automation.netlify.app/docs/add-new-api-client#5-helpers for implementation details.
2679
2694
  *
2680
2695
  * @summary Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
2681
2696
  * @param replaceAllObjects - The `replaceAllObjects` object.
@@ -2722,6 +2737,28 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2722
2737
  });
2723
2738
  return { copyOperationResponse, batchResponses, moveOperationResponse };
2724
2739
  },
2740
+ /**
2741
+ * Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
2742
+ * Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.
2743
+ *
2744
+ * @summary Search multiple indices for `hits`.
2745
+ * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
2746
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2747
+ */
2748
+ searchForHits(searchMethodParams, requestOptions) {
2749
+ return this.search(searchMethodParams, requestOptions);
2750
+ },
2751
+ /**
2752
+ * Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).
2753
+ * Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.
2754
+ *
2755
+ * @summary Search multiple indices for `facets`.
2756
+ * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
2757
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2758
+ */
2759
+ searchForFacets(searchMethodParams, requestOptions) {
2760
+ return this.search(searchMethodParams, requestOptions);
2761
+ },
2725
2762
  /**
2726
2763
  * Creates a new API key with specific permissions and restrictions.
2727
2764
  *
@@ -4570,7 +4607,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
4570
4607
  }
4571
4608
 
4572
4609
  // 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.
4573
- const apiClientVersion$1 = '5.0.0';
4610
+ const apiClientVersion$1 = '5.1.0';
4574
4611
  function getDefaultHosts(appId) {
4575
4612
  return [
4576
4613
  {
@@ -3,7 +3,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, createIterablePromise,
3
3
  import { createHttpRequester } from '@algolia/requester-node-http';
4
4
 
5
5
  // 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.
6
- const apiClientVersion$5 = '5.0.0';
6
+ const apiClientVersion$5 = '5.1.0';
7
7
  const REGIONS$2 = ['de', 'us'];
8
8
  function getDefaultHosts$4(region) {
9
9
  const url = !region
@@ -279,6 +279,43 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
279
279
  };
280
280
  return transporter.request(request, requestOptions);
281
281
  },
282
+ /**
283
+ * Schedule an A/B test to be started at a later time.
284
+ *
285
+ * Required API Key ACLs:
286
+ * - editSettings.
287
+ *
288
+ * @param scheduleABTestsRequest - The scheduleABTestsRequest object.
289
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
290
+ */
291
+ scheduleABTest(scheduleABTestsRequest, requestOptions) {
292
+ if (!scheduleABTestsRequest) {
293
+ throw new Error('Parameter `scheduleABTestsRequest` is required when calling `scheduleABTest`.');
294
+ }
295
+ if (!scheduleABTestsRequest.name) {
296
+ throw new Error('Parameter `scheduleABTestsRequest.name` is required when calling `scheduleABTest`.');
297
+ }
298
+ if (!scheduleABTestsRequest.variants) {
299
+ throw new Error('Parameter `scheduleABTestsRequest.variants` is required when calling `scheduleABTest`.');
300
+ }
301
+ if (!scheduleABTestsRequest.scheduledAt) {
302
+ throw new Error('Parameter `scheduleABTestsRequest.scheduledAt` is required when calling `scheduleABTest`.');
303
+ }
304
+ if (!scheduleABTestsRequest.endAt) {
305
+ throw new Error('Parameter `scheduleABTestsRequest.endAt` is required when calling `scheduleABTest`.');
306
+ }
307
+ const requestPath = '/2/abtests/schedule';
308
+ const headers = {};
309
+ const queryParameters = {};
310
+ const request = {
311
+ method: 'POST',
312
+ path: requestPath,
313
+ queryParameters,
314
+ headers,
315
+ data: scheduleABTestsRequest,
316
+ };
317
+ return transporter.request(request, requestOptions);
318
+ },
282
319
  /**
283
320
  * Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
284
321
  *
@@ -308,7 +345,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
308
345
  }
309
346
 
310
347
  // 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.
311
- const apiClientVersion$4 = '5.0.0';
348
+ const apiClientVersion$4 = '5.1.0';
312
349
  const REGIONS$1 = ['de', 'us'];
313
350
  function getDefaultHosts$3(region) {
314
351
  const url = !region
@@ -1363,7 +1400,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1363
1400
  }
1364
1401
 
1365
1402
  // 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.
1366
- const apiClientVersion$3 = '5.0.0';
1403
+ const apiClientVersion$3 = '5.1.0';
1367
1404
  const REGIONS = ['eu', 'us'];
1368
1405
  function getDefaultHosts$2(region) {
1369
1406
  const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
@@ -1624,7 +1661,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1624
1661
  }
1625
1662
 
1626
1663
  // 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.
1627
- const apiClientVersion$2 = '5.0.0';
1664
+ const apiClientVersion$2 = '5.1.0';
1628
1665
  function getDefaultHosts$1(appId) {
1629
1666
  return [
1630
1667
  {
@@ -1902,28 +1939,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1902
1939
  ...browseSynonymsOptions,
1903
1940
  });
1904
1941
  },
1905
- /**
1906
- * Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
1907
- * Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.
1908
- *
1909
- * @summary Search multiple indices for `hits`.
1910
- * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
1911
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1912
- */
1913
- searchForHits(searchMethodParams, requestOptions) {
1914
- return this.search(searchMethodParams, requestOptions);
1915
- },
1916
- /**
1917
- * Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).
1918
- * Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.
1919
- *
1920
- * @summary Search multiple indices for `facets`.
1921
- * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
1922
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1923
- */
1924
- searchForFacets(searchMethodParams, requestOptions) {
1925
- return this.search(searchMethodParams, requestOptions);
1926
- },
1927
1942
  /**
1928
1943
  * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
1929
1944
  *
@@ -2003,7 +2018,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2003
2018
  },
2004
2019
  /**
2005
2020
  * Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
2006
- * See https://api-clients-automation.netlify.app/docs/contributing/add-new-api-client#5-helpers for implementation details.
2021
+ * See https://api-clients-automation.netlify.app/docs/add-new-api-client#5-helpers for implementation details.
2007
2022
  *
2008
2023
  * @summary Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
2009
2024
  * @param replaceAllObjects - The `replaceAllObjects` object.
@@ -2050,6 +2065,28 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2050
2065
  });
2051
2066
  return { copyOperationResponse, batchResponses, moveOperationResponse };
2052
2067
  },
2068
+ /**
2069
+ * Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
2070
+ * Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.
2071
+ *
2072
+ * @summary Search multiple indices for `hits`.
2073
+ * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
2074
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2075
+ */
2076
+ searchForHits(searchMethodParams, requestOptions) {
2077
+ return this.search(searchMethodParams, requestOptions);
2078
+ },
2079
+ /**
2080
+ * Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).
2081
+ * Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.
2082
+ *
2083
+ * @summary Search multiple indices for `facets`.
2084
+ * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
2085
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2086
+ */
2087
+ searchForFacets(searchMethodParams, requestOptions) {
2088
+ return this.search(searchMethodParams, requestOptions);
2089
+ },
2053
2090
  /**
2054
2091
  * Creates a new API key with specific permissions and restrictions.
2055
2092
  *
@@ -3898,7 +3935,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3898
3935
  }
3899
3936
 
3900
3937
  // 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.
3901
- const apiClientVersion$1 = '5.0.0';
3938
+ const apiClientVersion$1 = '5.1.0';
3902
3939
  function getDefaultHosts(appId) {
3903
3940
  return [
3904
3941
  {