algoliasearch 5.0.2 → 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 (31) hide show
  1. package/dist/algoliasearch/builds/browser.d.ts +6 -6
  2. package/dist/algoliasearch/builds/node.d.ts +6 -6
  3. package/dist/algoliasearch.cjs +64 -27
  4. package/dist/algoliasearch.esm.browser.js +64 -27
  5. package/dist/algoliasearch.esm.node.js +64 -27
  6. package/dist/algoliasearch.umd.js +2 -2
  7. package/dist/client-abtesting/model/index.d.ts +2 -0
  8. package/dist/client-abtesting/model/index.d.ts.map +1 -1
  9. package/dist/client-abtesting/model/scheduleABTestResponse.d.ts +7 -0
  10. package/dist/client-abtesting/model/scheduleABTestResponse.d.ts.map +1 -0
  11. package/dist/client-abtesting/model/scheduleABTestsRequest.d.ts +20 -0
  12. package/dist/client-abtesting/model/scheduleABTestsRequest.d.ts.map +1 -0
  13. package/dist/client-abtesting/src/abtestingClient.d.ts +13 -1
  14. package/dist/client-abtesting/src/abtestingClient.d.ts.map +1 -1
  15. package/dist/client-analytics/src/analyticsClient.d.ts +1 -1
  16. package/dist/client-personalization/src/personalizationClient.d.ts +1 -1
  17. package/dist/client-search/src/searchClient.d.ts +23 -23
  18. package/dist/client-search/src/searchClient.d.ts.map +1 -1
  19. package/dist/lite/builds/browser.d.ts +6 -0
  20. package/dist/lite/builds/browser.d.ts.map +1 -1
  21. package/dist/lite/builds/node.d.ts +6 -0
  22. package/dist/lite/builds/node.d.ts.map +1 -1
  23. package/dist/lite/lite.cjs +23 -1
  24. package/dist/lite/lite.esm.browser.js +23 -1
  25. package/dist/lite/lite.esm.node.js +23 -1
  26. package/dist/lite/lite.umd.js +2 -2
  27. package/dist/lite/src/liteClient.d.ts +25 -1
  28. package/dist/lite/src/liteClient.d.ts.map +1 -1
  29. package/dist/recommend/src/recommendClient.d.ts +1 -1
  30. package/lite/src/liteClient.ts +36 -1
  31. package/package.json +9 -9
@@ -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.2";
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.2";
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.2';
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.2';
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.2';
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.2';
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
  *
@@ -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.2';
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.2';
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.2';
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.2';
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.2';
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
  *
@@ -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.2';
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.2';
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.2';
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.2';
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.2';
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
  *
@@ -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.2';
3938
+ const apiClientVersion$1 = '5.1.0';
3902
3939
  function getDefaultHosts(appId) {
3903
3940
  return [
3904
3941
  {