@algolia/client-search 5.50.2 → 5.52.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 +115 -8
- package/dist/builds/browser.js +12 -12
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +1 -1
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +2 -2
- package/dist/builds/fetch.js +12 -12
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +12 -12
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +12 -12
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +12 -12
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +115 -8
- package/dist/node.d.cts +115 -8
- package/dist/node.d.ts +115 -8
- package/dist/src/searchClient.cjs +12 -12
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +12 -12
- package/dist/src/searchClient.js.map +1 -1
- package/dist/worker.d.ts +115 -8
- package/package.json +6 -6
package/dist/builds/worker.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getAlgoliaAgent,
|
|
12
12
|
shuffle
|
|
13
13
|
} from "@algolia/client-common";
|
|
14
|
-
var apiClientVersion = "5.
|
|
14
|
+
var apiClientVersion = "5.52.0";
|
|
15
15
|
function getDefaultHosts(appId) {
|
|
16
16
|
return [
|
|
17
17
|
{
|
|
@@ -121,14 +121,14 @@ function createSearchClient({
|
|
|
121
121
|
* @param waitForTaskOptions - The `waitForTaskOptions` object.
|
|
122
122
|
* @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.
|
|
123
123
|
* @param waitForTaskOptions.taskID - The `taskID` returned in the method response.
|
|
124
|
-
* @param waitForTaskOptions.maxRetries - The maximum number of retries.
|
|
124
|
+
* @param waitForTaskOptions.maxRetries - The maximum number of retries. 100 by default.
|
|
125
125
|
* @param waitForTaskOptions.timeout - The function to decide how long to wait between retries.
|
|
126
126
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
127
127
|
*/
|
|
128
128
|
waitForTask({
|
|
129
129
|
indexName,
|
|
130
130
|
taskID,
|
|
131
|
-
maxRetries =
|
|
131
|
+
maxRetries = 100,
|
|
132
132
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
133
133
|
}, requestOptions) {
|
|
134
134
|
let retryCount = 0;
|
|
@@ -138,7 +138,7 @@ function createSearchClient({
|
|
|
138
138
|
aggregator: () => retryCount += 1,
|
|
139
139
|
error: {
|
|
140
140
|
validate: () => retryCount >= maxRetries,
|
|
141
|
-
message: () => `
|
|
141
|
+
message: () => `Stopped waiting for the task after ${maxRetries} retries. This does not mean the operation failed; it may still complete. If you need to keep polling, retry with a higher maxRetries.`
|
|
142
142
|
},
|
|
143
143
|
timeout: () => timeout(retryCount)
|
|
144
144
|
});
|
|
@@ -149,13 +149,13 @@ function createSearchClient({
|
|
|
149
149
|
* @summary Helper method that waits for a task to be published (completed).
|
|
150
150
|
* @param waitForAppTaskOptions - The `waitForTaskOptions` object.
|
|
151
151
|
* @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.
|
|
152
|
-
* @param waitForAppTaskOptions.maxRetries - The maximum number of retries.
|
|
152
|
+
* @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 100 by default.
|
|
153
153
|
* @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.
|
|
154
154
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
155
155
|
*/
|
|
156
156
|
waitForAppTask({
|
|
157
157
|
taskID,
|
|
158
|
-
maxRetries =
|
|
158
|
+
maxRetries = 100,
|
|
159
159
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
160
160
|
}, requestOptions) {
|
|
161
161
|
let retryCount = 0;
|
|
@@ -165,7 +165,7 @@ function createSearchClient({
|
|
|
165
165
|
aggregator: () => retryCount += 1,
|
|
166
166
|
error: {
|
|
167
167
|
validate: () => retryCount >= maxRetries,
|
|
168
|
-
message: () => `
|
|
168
|
+
message: () => `Stopped waiting for the task after ${maxRetries} retries. This does not mean the operation failed; it may still complete. If you need to keep polling, retry with a higher maxRetries.`
|
|
169
169
|
},
|
|
170
170
|
timeout: () => timeout(retryCount)
|
|
171
171
|
});
|
|
@@ -178,7 +178,7 @@ function createSearchClient({
|
|
|
178
178
|
* @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.
|
|
179
179
|
* @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.
|
|
180
180
|
* @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.
|
|
181
|
-
* @param waitForApiKeyOptions.maxRetries - The maximum number of retries.
|
|
181
|
+
* @param waitForApiKeyOptions.maxRetries - The maximum number of retries. 100 by default.
|
|
182
182
|
* @param waitForApiKeyOptions.timeout - The function to decide how long to wait between retries.
|
|
183
183
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getApikey` method and merged with the transporter requestOptions.
|
|
184
184
|
*/
|
|
@@ -186,7 +186,7 @@ function createSearchClient({
|
|
|
186
186
|
operation,
|
|
187
187
|
key,
|
|
188
188
|
apiKey,
|
|
189
|
-
maxRetries =
|
|
189
|
+
maxRetries = 100,
|
|
190
190
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
191
191
|
}, requestOptions) {
|
|
192
192
|
let retryCount = 0;
|
|
@@ -194,7 +194,7 @@ function createSearchClient({
|
|
|
194
194
|
aggregator: () => retryCount += 1,
|
|
195
195
|
error: {
|
|
196
196
|
validate: () => retryCount >= maxRetries,
|
|
197
|
-
message: () => `
|
|
197
|
+
message: () => `Stopped waiting for the API key operation after ${maxRetries} retries. This does not mean the operation failed; it may still complete. If you need to keep polling, retry with a higher maxRetries.`
|
|
198
198
|
},
|
|
199
199
|
timeout: () => timeout(retryCount)
|
|
200
200
|
};
|
|
@@ -2006,11 +2006,11 @@ function createSearchClient({
|
|
|
2006
2006
|
return transporter.request(request, requestOptions);
|
|
2007
2007
|
},
|
|
2008
2008
|
/**
|
|
2009
|
-
*
|
|
2009
|
+
* Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.
|
|
2010
2010
|
*
|
|
2011
2011
|
* Required API Key ACLs:
|
|
2012
2012
|
* - search
|
|
2013
|
-
* @param searchMethodParams -
|
|
2013
|
+
* @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
|
|
2014
2014
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2015
2015
|
*/
|
|
2016
2016
|
search(searchMethodParams, requestOptions) {
|