@algolia/client-search 5.50.1 → 5.51.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 +113 -6
- package/dist/builds/browser.js +10 -10
- 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 +10 -10
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +10 -10
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +10 -10
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +10 -10
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +113 -6
- package/dist/node.d.cts +113 -6
- package/dist/node.d.ts +113 -6
- package/dist/src/searchClient.cjs +10 -10
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +10 -10
- package/dist/src/searchClient.js.map +1 -1
- package/dist/worker.d.ts +113 -6
- package/package.json +6 -6
package/dist/builds/node.js
CHANGED
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
getAlgoliaAgent,
|
|
22
22
|
shuffle
|
|
23
23
|
} from "@algolia/client-common";
|
|
24
|
-
var apiClientVersion = "5.
|
|
24
|
+
var apiClientVersion = "5.51.0";
|
|
25
25
|
function getDefaultHosts(appId) {
|
|
26
26
|
return [
|
|
27
27
|
{
|
|
@@ -131,14 +131,14 @@ function createSearchClient({
|
|
|
131
131
|
* @param waitForTaskOptions - The `waitForTaskOptions` object.
|
|
132
132
|
* @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.
|
|
133
133
|
* @param waitForTaskOptions.taskID - The `taskID` returned in the method response.
|
|
134
|
-
* @param waitForTaskOptions.maxRetries - The maximum number of retries.
|
|
134
|
+
* @param waitForTaskOptions.maxRetries - The maximum number of retries. 100 by default.
|
|
135
135
|
* @param waitForTaskOptions.timeout - The function to decide how long to wait between retries.
|
|
136
136
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
137
137
|
*/
|
|
138
138
|
waitForTask({
|
|
139
139
|
indexName,
|
|
140
140
|
taskID,
|
|
141
|
-
maxRetries =
|
|
141
|
+
maxRetries = 100,
|
|
142
142
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
143
143
|
}, requestOptions) {
|
|
144
144
|
let retryCount = 0;
|
|
@@ -148,7 +148,7 @@ function createSearchClient({
|
|
|
148
148
|
aggregator: () => retryCount += 1,
|
|
149
149
|
error: {
|
|
150
150
|
validate: () => retryCount >= maxRetries,
|
|
151
|
-
message: () => `
|
|
151
|
+
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.`
|
|
152
152
|
},
|
|
153
153
|
timeout: () => timeout(retryCount)
|
|
154
154
|
});
|
|
@@ -159,13 +159,13 @@ function createSearchClient({
|
|
|
159
159
|
* @summary Helper method that waits for a task to be published (completed).
|
|
160
160
|
* @param waitForAppTaskOptions - The `waitForTaskOptions` object.
|
|
161
161
|
* @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.
|
|
162
|
-
* @param waitForAppTaskOptions.maxRetries - The maximum number of retries.
|
|
162
|
+
* @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 100 by default.
|
|
163
163
|
* @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.
|
|
164
164
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
165
165
|
*/
|
|
166
166
|
waitForAppTask({
|
|
167
167
|
taskID,
|
|
168
|
-
maxRetries =
|
|
168
|
+
maxRetries = 100,
|
|
169
169
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
170
170
|
}, requestOptions) {
|
|
171
171
|
let retryCount = 0;
|
|
@@ -175,7 +175,7 @@ function createSearchClient({
|
|
|
175
175
|
aggregator: () => retryCount += 1,
|
|
176
176
|
error: {
|
|
177
177
|
validate: () => retryCount >= maxRetries,
|
|
178
|
-
message: () => `
|
|
178
|
+
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.`
|
|
179
179
|
},
|
|
180
180
|
timeout: () => timeout(retryCount)
|
|
181
181
|
});
|
|
@@ -188,7 +188,7 @@ function createSearchClient({
|
|
|
188
188
|
* @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.
|
|
189
189
|
* @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.
|
|
190
190
|
* @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.
|
|
191
|
-
* @param waitForApiKeyOptions.maxRetries - The maximum number of retries.
|
|
191
|
+
* @param waitForApiKeyOptions.maxRetries - The maximum number of retries. 100 by default.
|
|
192
192
|
* @param waitForApiKeyOptions.timeout - The function to decide how long to wait between retries.
|
|
193
193
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getApikey` method and merged with the transporter requestOptions.
|
|
194
194
|
*/
|
|
@@ -196,7 +196,7 @@ function createSearchClient({
|
|
|
196
196
|
operation,
|
|
197
197
|
key,
|
|
198
198
|
apiKey,
|
|
199
|
-
maxRetries =
|
|
199
|
+
maxRetries = 100,
|
|
200
200
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
201
201
|
}, requestOptions) {
|
|
202
202
|
let retryCount = 0;
|
|
@@ -204,7 +204,7 @@ function createSearchClient({
|
|
|
204
204
|
aggregator: () => retryCount += 1,
|
|
205
205
|
error: {
|
|
206
206
|
validate: () => retryCount >= maxRetries,
|
|
207
|
-
message: () => `
|
|
207
|
+
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.`
|
|
208
208
|
},
|
|
209
209
|
timeout: () => timeout(retryCount)
|
|
210
210
|
};
|