@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
|
@@ -25,7 +25,7 @@ __export(searchClient_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(searchClient_exports);
|
|
27
27
|
var import_client_common = require("@algolia/client-common");
|
|
28
|
-
var apiClientVersion = "5.
|
|
28
|
+
var apiClientVersion = "5.51.0";
|
|
29
29
|
function getDefaultHosts(appId) {
|
|
30
30
|
return [
|
|
31
31
|
{
|
|
@@ -135,14 +135,14 @@ function createSearchClient({
|
|
|
135
135
|
* @param waitForTaskOptions - The `waitForTaskOptions` object.
|
|
136
136
|
* @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.
|
|
137
137
|
* @param waitForTaskOptions.taskID - The `taskID` returned in the method response.
|
|
138
|
-
* @param waitForTaskOptions.maxRetries - The maximum number of retries.
|
|
138
|
+
* @param waitForTaskOptions.maxRetries - The maximum number of retries. 100 by default.
|
|
139
139
|
* @param waitForTaskOptions.timeout - The function to decide how long to wait between retries.
|
|
140
140
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
141
141
|
*/
|
|
142
142
|
waitForTask({
|
|
143
143
|
indexName,
|
|
144
144
|
taskID,
|
|
145
|
-
maxRetries =
|
|
145
|
+
maxRetries = 100,
|
|
146
146
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
147
147
|
}, requestOptions) {
|
|
148
148
|
let retryCount = 0;
|
|
@@ -152,7 +152,7 @@ function createSearchClient({
|
|
|
152
152
|
aggregator: () => retryCount += 1,
|
|
153
153
|
error: {
|
|
154
154
|
validate: () => retryCount >= maxRetries,
|
|
155
|
-
message: () => `
|
|
155
|
+
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.`
|
|
156
156
|
},
|
|
157
157
|
timeout: () => timeout(retryCount)
|
|
158
158
|
});
|
|
@@ -163,13 +163,13 @@ function createSearchClient({
|
|
|
163
163
|
* @summary Helper method that waits for a task to be published (completed).
|
|
164
164
|
* @param waitForAppTaskOptions - The `waitForTaskOptions` object.
|
|
165
165
|
* @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.
|
|
166
|
-
* @param waitForAppTaskOptions.maxRetries - The maximum number of retries.
|
|
166
|
+
* @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 100 by default.
|
|
167
167
|
* @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.
|
|
168
168
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
169
169
|
*/
|
|
170
170
|
waitForAppTask({
|
|
171
171
|
taskID,
|
|
172
|
-
maxRetries =
|
|
172
|
+
maxRetries = 100,
|
|
173
173
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
174
174
|
}, requestOptions) {
|
|
175
175
|
let retryCount = 0;
|
|
@@ -179,7 +179,7 @@ function createSearchClient({
|
|
|
179
179
|
aggregator: () => retryCount += 1,
|
|
180
180
|
error: {
|
|
181
181
|
validate: () => retryCount >= maxRetries,
|
|
182
|
-
message: () => `
|
|
182
|
+
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.`
|
|
183
183
|
},
|
|
184
184
|
timeout: () => timeout(retryCount)
|
|
185
185
|
});
|
|
@@ -192,7 +192,7 @@ function createSearchClient({
|
|
|
192
192
|
* @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.
|
|
193
193
|
* @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.
|
|
194
194
|
* @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.
|
|
195
|
-
* @param waitForApiKeyOptions.maxRetries - The maximum number of retries.
|
|
195
|
+
* @param waitForApiKeyOptions.maxRetries - The maximum number of retries. 100 by default.
|
|
196
196
|
* @param waitForApiKeyOptions.timeout - The function to decide how long to wait between retries.
|
|
197
197
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getApikey` method and merged with the transporter requestOptions.
|
|
198
198
|
*/
|
|
@@ -200,7 +200,7 @@ function createSearchClient({
|
|
|
200
200
|
operation,
|
|
201
201
|
key,
|
|
202
202
|
apiKey,
|
|
203
|
-
maxRetries =
|
|
203
|
+
maxRetries = 100,
|
|
204
204
|
timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
|
|
205
205
|
}, requestOptions) {
|
|
206
206
|
let retryCount = 0;
|
|
@@ -208,7 +208,7 @@ function createSearchClient({
|
|
|
208
208
|
aggregator: () => retryCount += 1,
|
|
209
209
|
error: {
|
|
210
210
|
validate: () => retryCount >= maxRetries,
|
|
211
|
-
message: () => `
|
|
211
|
+
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.`
|
|
212
212
|
},
|
|
213
213
|
timeout: () => timeout(retryCount)
|
|
214
214
|
};
|