@algolia/client-search 5.27.0 → 5.29.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 +377 -368
- package/dist/builds/browser.js +8 -8
- 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 +8 -8
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +8 -8
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +8 -8
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +8 -8
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +377 -368
- package/dist/node.d.cts +377 -368
- package/dist/node.d.ts +377 -368
- package/dist/src/searchClient.cjs +8 -8
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +8 -8
- package/dist/src/searchClient.js.map +1 -1
- package/dist/worker.d.ts +377 -368
- package/package.json +7 -7
package/dist/fetch.d.ts
CHANGED
|
@@ -28,31 +28,31 @@ type ApiKey = {
|
|
|
28
28
|
/**
|
|
29
29
|
* Description of an API key to help you identify this API key.
|
|
30
30
|
*/
|
|
31
|
-
description?: string;
|
|
31
|
+
description?: string | undefined;
|
|
32
32
|
/**
|
|
33
33
|
* Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\".
|
|
34
34
|
*/
|
|
35
|
-
indexes?: Array<string
|
|
35
|
+
indexes?: Array<string> | undefined;
|
|
36
36
|
/**
|
|
37
37
|
* Maximum number of results this API key can retrieve in one query. By default, there\'s no limit.
|
|
38
38
|
*/
|
|
39
|
-
maxHitsPerQuery?: number;
|
|
39
|
+
maxHitsPerQuery?: number | undefined;
|
|
40
40
|
/**
|
|
41
41
|
* Maximum number of API requests allowed per IP address or [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) per hour. If this limit is reached, the API returns an error with status code `429`. By default, there\'s no limit.
|
|
42
42
|
*/
|
|
43
|
-
maxQueriesPerIPPerHour?: number;
|
|
43
|
+
maxQueriesPerIPPerHour?: number | undefined;
|
|
44
44
|
/**
|
|
45
45
|
* Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address outside the restricted range.
|
|
46
46
|
*/
|
|
47
|
-
queryParameters?: string;
|
|
47
|
+
queryParameters?: string | undefined;
|
|
48
48
|
/**
|
|
49
49
|
* Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don\'t rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions).
|
|
50
50
|
*/
|
|
51
|
-
referers?: Array<string
|
|
51
|
+
referers?: Array<string> | undefined;
|
|
52
52
|
/**
|
|
53
53
|
* Duration (in seconds) after which the API key expires. By default, API keys don\'t expire.
|
|
54
54
|
*/
|
|
55
|
-
validity?: number;
|
|
55
|
+
validity?: number | undefined;
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
/**
|
|
@@ -65,7 +65,7 @@ type MultipleBatchRequest = {
|
|
|
65
65
|
/**
|
|
66
66
|
* Operation arguments (varies with specified `action`).
|
|
67
67
|
*/
|
|
68
|
-
body?: Record<string, unknown
|
|
68
|
+
body?: Record<string, unknown> | undefined;
|
|
69
69
|
/**
|
|
70
70
|
* Index name (case-sensitive).
|
|
71
71
|
*/
|
|
@@ -97,42 +97,42 @@ type Exhaustive = {
|
|
|
97
97
|
/**
|
|
98
98
|
* Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
|
|
99
99
|
*/
|
|
100
|
-
facetsCount?: boolean;
|
|
100
|
+
facetsCount?: boolean | undefined;
|
|
101
101
|
/**
|
|
102
102
|
* The value is `false` if not all facet values are retrieved.
|
|
103
103
|
*/
|
|
104
|
-
facetValues?: boolean;
|
|
104
|
+
facetValues?: boolean | undefined;
|
|
105
105
|
/**
|
|
106
106
|
* Whether the `nbHits` is exhaustive (`true`) or approximate (`false`). When the query takes more than 50ms to be processed, the engine makes an approximation. This can happen when using complex filters on millions of records, when typo-tolerance was not exhaustive, or when enough hits have been retrieved (for example, after the engine finds 10,000 exact matches). `nbHits` is reported as non-exhaustive whenever an approximation is made, even if the approximation didn’t, in the end, impact the exhaustivity of the query.
|
|
107
107
|
*/
|
|
108
|
-
nbHits?: boolean;
|
|
108
|
+
nbHits?: boolean | undefined;
|
|
109
109
|
/**
|
|
110
110
|
* Rules matching exhaustivity. The value is `false` if rules were enable for this query, and could not be fully processed due a timeout. This is generally caused by the number of alternatives (such as typos) which is too large.
|
|
111
111
|
*/
|
|
112
|
-
rulesMatch?: boolean;
|
|
112
|
+
rulesMatch?: boolean | undefined;
|
|
113
113
|
/**
|
|
114
114
|
* Whether the typo search was exhaustive (`true`) or approximate (`false`). An approximation is done when the typo search query part takes more than 10% of the query budget (ie. 5ms by default) to be processed (this can happen when a lot of typo alternatives exist for the query). This field will not be included when typo-tolerance is entirely disabled.
|
|
115
115
|
*/
|
|
116
|
-
typo?: boolean;
|
|
116
|
+
typo?: boolean | undefined;
|
|
117
117
|
};
|
|
118
118
|
|
|
119
119
|
type FacetStats = {
|
|
120
120
|
/**
|
|
121
121
|
* Minimum value in the results.
|
|
122
122
|
*/
|
|
123
|
-
min?: number;
|
|
123
|
+
min?: number | undefined;
|
|
124
124
|
/**
|
|
125
125
|
* Maximum value in the results.
|
|
126
126
|
*/
|
|
127
|
-
max?: number;
|
|
127
|
+
max?: number | undefined;
|
|
128
128
|
/**
|
|
129
129
|
* Average facet value in the results.
|
|
130
130
|
*/
|
|
131
|
-
avg?: number;
|
|
131
|
+
avg?: number | undefined;
|
|
132
132
|
/**
|
|
133
133
|
* Sum of all values in the results.
|
|
134
134
|
*/
|
|
135
|
-
sum?: number;
|
|
135
|
+
sum?: number | undefined;
|
|
136
136
|
};
|
|
137
137
|
|
|
138
138
|
/**
|
|
@@ -166,7 +166,7 @@ type RedirectRuleIndexMetadata = {
|
|
|
166
166
|
* [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/), this this parameter is for internal use only.
|
|
167
167
|
*/
|
|
168
168
|
type Redirect = {
|
|
169
|
-
index?: Array<RedirectRuleIndexMetadata
|
|
169
|
+
index?: Array<RedirectRuleIndexMetadata> | undefined;
|
|
170
170
|
};
|
|
171
171
|
|
|
172
172
|
/**
|
|
@@ -176,7 +176,7 @@ type Facets = {
|
|
|
176
176
|
/**
|
|
177
177
|
* Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
|
|
178
178
|
*/
|
|
179
|
-
order?: Array<string
|
|
179
|
+
order?: Array<string> | undefined;
|
|
180
180
|
};
|
|
181
181
|
|
|
182
182
|
/**
|
|
@@ -188,62 +188,62 @@ type Value = {
|
|
|
188
188
|
/**
|
|
189
189
|
* Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
|
|
190
190
|
*/
|
|
191
|
-
order?: Array<string
|
|
192
|
-
sortRemainingBy?: SortRemainingBy;
|
|
191
|
+
order?: Array<string> | undefined;
|
|
192
|
+
sortRemainingBy?: SortRemainingBy | undefined;
|
|
193
193
|
/**
|
|
194
194
|
* Hide facet values.
|
|
195
195
|
*/
|
|
196
|
-
hide?: Array<string
|
|
196
|
+
hide?: Array<string> | undefined;
|
|
197
197
|
};
|
|
198
198
|
|
|
199
199
|
/**
|
|
200
200
|
* Order of facet names and facet values in your UI.
|
|
201
201
|
*/
|
|
202
202
|
type FacetOrdering = {
|
|
203
|
-
facets?: Facets;
|
|
203
|
+
facets?: Facets | undefined;
|
|
204
204
|
/**
|
|
205
205
|
* Order of facet values. One object for each facet.
|
|
206
206
|
*/
|
|
207
207
|
values?: {
|
|
208
208
|
[key: string]: Value;
|
|
209
|
-
};
|
|
209
|
+
} | undefined;
|
|
210
210
|
};
|
|
211
211
|
|
|
212
212
|
/**
|
|
213
213
|
* The redirect rule container.
|
|
214
214
|
*/
|
|
215
215
|
type RedirectURL = {
|
|
216
|
-
url?: string;
|
|
216
|
+
url?: string | undefined;
|
|
217
217
|
};
|
|
218
218
|
|
|
219
219
|
/**
|
|
220
220
|
* URL for an image to show inside a banner.
|
|
221
221
|
*/
|
|
222
222
|
type BannerImageUrl = {
|
|
223
|
-
url?: string;
|
|
223
|
+
url?: string | undefined;
|
|
224
224
|
};
|
|
225
225
|
|
|
226
226
|
/**
|
|
227
227
|
* Image to show inside a banner.
|
|
228
228
|
*/
|
|
229
229
|
type BannerImage = {
|
|
230
|
-
urls?: Array<BannerImageUrl
|
|
231
|
-
title?: string;
|
|
230
|
+
urls?: Array<BannerImageUrl> | undefined;
|
|
231
|
+
title?: string | undefined;
|
|
232
232
|
};
|
|
233
233
|
|
|
234
234
|
/**
|
|
235
235
|
* Link for a banner defined in the Merchandising Studio.
|
|
236
236
|
*/
|
|
237
237
|
type BannerLink = {
|
|
238
|
-
url?: string;
|
|
238
|
+
url?: string | undefined;
|
|
239
239
|
};
|
|
240
240
|
|
|
241
241
|
/**
|
|
242
242
|
* Banner with image and link to redirect users.
|
|
243
243
|
*/
|
|
244
244
|
type Banner = {
|
|
245
|
-
image?: BannerImage;
|
|
246
|
-
link?: BannerLink;
|
|
245
|
+
image?: BannerImage | undefined;
|
|
246
|
+
link?: BannerLink | undefined;
|
|
247
247
|
};
|
|
248
248
|
|
|
249
249
|
/**
|
|
@@ -253,52 +253,52 @@ type Widgets = {
|
|
|
253
253
|
/**
|
|
254
254
|
* Banners defined in the Merchandising Studio for a given search.
|
|
255
255
|
*/
|
|
256
|
-
banners?: Array<Banner
|
|
256
|
+
banners?: Array<Banner> | undefined;
|
|
257
257
|
};
|
|
258
258
|
|
|
259
259
|
/**
|
|
260
260
|
* Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as the order of facet names and values without changing your frontend code.
|
|
261
261
|
*/
|
|
262
262
|
type RenderingContent = {
|
|
263
|
-
facetOrdering?: FacetOrdering;
|
|
264
|
-
redirect?: RedirectURL;
|
|
265
|
-
widgets?: Widgets;
|
|
263
|
+
facetOrdering?: FacetOrdering | undefined;
|
|
264
|
+
redirect?: RedirectURL | undefined;
|
|
265
|
+
widgets?: Widgets | undefined;
|
|
266
266
|
};
|
|
267
267
|
|
|
268
268
|
type BaseSearchResponse = Record<string, any> & {
|
|
269
269
|
/**
|
|
270
270
|
* A/B test ID. This is only included in the response for indices that are part of an A/B test.
|
|
271
271
|
*/
|
|
272
|
-
abTestID?: number;
|
|
272
|
+
abTestID?: number | undefined;
|
|
273
273
|
/**
|
|
274
274
|
* Variant ID. This is only included in the response for indices that are part of an A/B test.
|
|
275
275
|
*/
|
|
276
|
-
abTestVariantID?: number;
|
|
276
|
+
abTestVariantID?: number | undefined;
|
|
277
277
|
/**
|
|
278
278
|
* Computed geographical location.
|
|
279
279
|
*/
|
|
280
|
-
aroundLatLng?: string;
|
|
280
|
+
aroundLatLng?: string | undefined;
|
|
281
281
|
/**
|
|
282
282
|
* Distance from a central coordinate provided by `aroundLatLng`.
|
|
283
283
|
*/
|
|
284
|
-
automaticRadius?: string;
|
|
285
|
-
exhaustive?: Exhaustive;
|
|
284
|
+
automaticRadius?: string | undefined;
|
|
285
|
+
exhaustive?: Exhaustive | undefined;
|
|
286
286
|
/**
|
|
287
287
|
* Rules applied to the query.
|
|
288
288
|
*/
|
|
289
|
-
appliedRules?: Array<Record<string, unknown
|
|
289
|
+
appliedRules?: Array<Record<string, unknown>> | undefined;
|
|
290
290
|
/**
|
|
291
291
|
* See the `facetsCount` field of the `exhaustive` object in the response.
|
|
292
292
|
*/
|
|
293
|
-
exhaustiveFacetsCount?: boolean;
|
|
293
|
+
exhaustiveFacetsCount?: boolean | undefined;
|
|
294
294
|
/**
|
|
295
295
|
* See the `nbHits` field of the `exhaustive` object in the response.
|
|
296
296
|
*/
|
|
297
|
-
exhaustiveNbHits?: boolean;
|
|
297
|
+
exhaustiveNbHits?: boolean | undefined;
|
|
298
298
|
/**
|
|
299
299
|
* See the `typo` field of the `exhaustive` object in the response.
|
|
300
300
|
*/
|
|
301
|
-
exhaustiveTypo?: boolean;
|
|
301
|
+
exhaustiveTypo?: boolean | undefined;
|
|
302
302
|
/**
|
|
303
303
|
* Facet counts.
|
|
304
304
|
*/
|
|
@@ -306,93 +306,93 @@ type BaseSearchResponse = Record<string, any> & {
|
|
|
306
306
|
[key: string]: {
|
|
307
307
|
[key: string]: number;
|
|
308
308
|
};
|
|
309
|
-
};
|
|
309
|
+
} | undefined;
|
|
310
310
|
/**
|
|
311
311
|
* Statistics for numerical facets.
|
|
312
312
|
*/
|
|
313
313
|
facets_stats?: {
|
|
314
314
|
[key: string]: FacetStats;
|
|
315
|
-
};
|
|
315
|
+
} | undefined;
|
|
316
316
|
/**
|
|
317
317
|
* Index name used for the query.
|
|
318
318
|
*/
|
|
319
|
-
index?: string;
|
|
319
|
+
index?: string | undefined;
|
|
320
320
|
/**
|
|
321
321
|
* Index name used for the query. During A/B testing, the targeted index isn\'t always the index used by the query.
|
|
322
322
|
*/
|
|
323
|
-
indexUsed?: string;
|
|
323
|
+
indexUsed?: string | undefined;
|
|
324
324
|
/**
|
|
325
325
|
* Warnings about the query.
|
|
326
326
|
*/
|
|
327
|
-
message?: string;
|
|
327
|
+
message?: string | undefined;
|
|
328
328
|
/**
|
|
329
329
|
* Number of hits selected and sorted by the relevant sort algorithm.
|
|
330
330
|
*/
|
|
331
|
-
nbSortedHits?: number;
|
|
331
|
+
nbSortedHits?: number | undefined;
|
|
332
332
|
/**
|
|
333
333
|
* Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) query string that will be searched.
|
|
334
334
|
*/
|
|
335
|
-
parsedQuery?: string;
|
|
335
|
+
parsedQuery?: string | undefined;
|
|
336
336
|
/**
|
|
337
337
|
* Time the server took to process the request, in milliseconds.
|
|
338
338
|
*/
|
|
339
|
-
processingTimeMS
|
|
339
|
+
processingTimeMS?: number | undefined;
|
|
340
340
|
/**
|
|
341
341
|
* Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues.
|
|
342
342
|
*/
|
|
343
|
-
processingTimingsMS?: Record<string, unknown
|
|
343
|
+
processingTimingsMS?: Record<string, unknown> | undefined;
|
|
344
344
|
/**
|
|
345
345
|
* Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set.
|
|
346
346
|
*/
|
|
347
|
-
queryAfterRemoval?: string;
|
|
348
|
-
redirect?: Redirect;
|
|
349
|
-
renderingContent?: RenderingContent;
|
|
347
|
+
queryAfterRemoval?: string | undefined;
|
|
348
|
+
redirect?: Redirect | undefined;
|
|
349
|
+
renderingContent?: RenderingContent | undefined;
|
|
350
350
|
/**
|
|
351
351
|
* Time the server took to process the request, in milliseconds.
|
|
352
352
|
*/
|
|
353
|
-
serverTimeMS?: number;
|
|
353
|
+
serverTimeMS?: number | undefined;
|
|
354
354
|
/**
|
|
355
355
|
* Host name of the server that processed the request.
|
|
356
356
|
*/
|
|
357
|
-
serverUsed?: string;
|
|
357
|
+
serverUsed?: string | undefined;
|
|
358
358
|
/**
|
|
359
359
|
* An object with custom data. You can store up to 32kB as custom data.
|
|
360
360
|
*/
|
|
361
|
-
userData?: any | null;
|
|
361
|
+
userData?: any | null | undefined;
|
|
362
362
|
/**
|
|
363
363
|
* Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
|
|
364
364
|
*/
|
|
365
|
-
queryID?: string;
|
|
365
|
+
queryID?: string | undefined;
|
|
366
366
|
/**
|
|
367
367
|
* Whether automatic events collection is enabled for the application.
|
|
368
368
|
*/
|
|
369
|
-
_automaticInsights?: boolean;
|
|
369
|
+
_automaticInsights?: boolean | undefined;
|
|
370
370
|
};
|
|
371
371
|
|
|
372
372
|
type BrowsePagination = {
|
|
373
373
|
/**
|
|
374
374
|
* Page of search results to retrieve.
|
|
375
375
|
*/
|
|
376
|
-
page?: number;
|
|
376
|
+
page?: number | undefined;
|
|
377
377
|
/**
|
|
378
378
|
* Number of results (hits).
|
|
379
379
|
*/
|
|
380
|
-
nbHits?: number;
|
|
380
|
+
nbHits?: number | undefined;
|
|
381
381
|
/**
|
|
382
382
|
* Number of pages of results.
|
|
383
383
|
*/
|
|
384
|
-
nbPages?: number;
|
|
384
|
+
nbPages?: number | undefined;
|
|
385
385
|
/**
|
|
386
386
|
* Number of hits per page.
|
|
387
387
|
*/
|
|
388
|
-
hitsPerPage?: number;
|
|
388
|
+
hitsPerPage?: number | undefined;
|
|
389
389
|
};
|
|
390
390
|
|
|
391
391
|
type Cursor = {
|
|
392
392
|
/**
|
|
393
393
|
* Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute.
|
|
394
394
|
*/
|
|
395
|
-
cursor?: string;
|
|
395
|
+
cursor?: string | undefined;
|
|
396
396
|
};
|
|
397
397
|
|
|
398
398
|
/**
|
|
@@ -416,7 +416,7 @@ type HighlightResultOption = {
|
|
|
416
416
|
/**
|
|
417
417
|
* Whether the entire attribute value is highlighted.
|
|
418
418
|
*/
|
|
419
|
-
fullyHighlighted?: boolean;
|
|
419
|
+
fullyHighlighted?: boolean | undefined;
|
|
420
420
|
};
|
|
421
421
|
|
|
422
422
|
type HighlightResult = HighlightResultOption | {
|
|
@@ -427,30 +427,30 @@ type MatchedGeoLocation = {
|
|
|
427
427
|
/**
|
|
428
428
|
* Latitude of the matched location.
|
|
429
429
|
*/
|
|
430
|
-
lat?: number;
|
|
430
|
+
lat?: number | undefined;
|
|
431
431
|
/**
|
|
432
432
|
* Longitude of the matched location.
|
|
433
433
|
*/
|
|
434
|
-
lng?: number;
|
|
434
|
+
lng?: number | undefined;
|
|
435
435
|
/**
|
|
436
436
|
* Distance between the matched location and the search location (in meters).
|
|
437
437
|
*/
|
|
438
|
-
distance?: number;
|
|
438
|
+
distance?: number | undefined;
|
|
439
439
|
};
|
|
440
440
|
|
|
441
441
|
type Personalization = {
|
|
442
442
|
/**
|
|
443
443
|
* The score of the filters.
|
|
444
444
|
*/
|
|
445
|
-
filtersScore?: number;
|
|
445
|
+
filtersScore?: number | undefined;
|
|
446
446
|
/**
|
|
447
447
|
* The score of the ranking.
|
|
448
448
|
*/
|
|
449
|
-
rankingScore?: number;
|
|
449
|
+
rankingScore?: number | undefined;
|
|
450
450
|
/**
|
|
451
451
|
* The score of the event.
|
|
452
452
|
*/
|
|
453
|
-
score?: number;
|
|
453
|
+
score?: number | undefined;
|
|
454
454
|
};
|
|
455
455
|
|
|
456
456
|
/**
|
|
@@ -460,7 +460,7 @@ type RankingInfo = {
|
|
|
460
460
|
/**
|
|
461
461
|
* Whether a filter matched the query.
|
|
462
462
|
*/
|
|
463
|
-
filters?: number;
|
|
463
|
+
filters?: number | undefined;
|
|
464
464
|
/**
|
|
465
465
|
* Position of the first matched word in the best matching attribute of the record.
|
|
466
466
|
*/
|
|
@@ -472,9 +472,9 @@ type RankingInfo = {
|
|
|
472
472
|
/**
|
|
473
473
|
* Precision used when computing the geo distance, in meters.
|
|
474
474
|
*/
|
|
475
|
-
geoPrecision?: number;
|
|
476
|
-
matchedGeoLocation?: MatchedGeoLocation;
|
|
477
|
-
personalization?: Personalization;
|
|
475
|
+
geoPrecision?: number | undefined;
|
|
476
|
+
matchedGeoLocation?: MatchedGeoLocation | undefined;
|
|
477
|
+
personalization?: Personalization | undefined;
|
|
478
478
|
/**
|
|
479
479
|
* Number of exactly matched words.
|
|
480
480
|
*/
|
|
@@ -486,11 +486,11 @@ type RankingInfo = {
|
|
|
486
486
|
/**
|
|
487
487
|
* Whether the record was promoted by a rule.
|
|
488
488
|
*/
|
|
489
|
-
promoted?: boolean;
|
|
489
|
+
promoted?: boolean | undefined;
|
|
490
490
|
/**
|
|
491
491
|
* Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0.
|
|
492
492
|
*/
|
|
493
|
-
proximityDistance?: number;
|
|
493
|
+
proximityDistance?: number | undefined;
|
|
494
494
|
/**
|
|
495
495
|
* Overall ranking of the record, expressed as a single integer. This attribute is internal.
|
|
496
496
|
*/
|
|
@@ -498,11 +498,11 @@ type RankingInfo = {
|
|
|
498
498
|
/**
|
|
499
499
|
* Number of matched words.
|
|
500
500
|
*/
|
|
501
|
-
words?: number;
|
|
501
|
+
words?: number | undefined;
|
|
502
502
|
/**
|
|
503
503
|
* Whether the record is re-ranked.
|
|
504
504
|
*/
|
|
505
|
-
promotedByReRanking?: boolean;
|
|
505
|
+
promotedByReRanking?: boolean | undefined;
|
|
506
506
|
};
|
|
507
507
|
|
|
508
508
|
/**
|
|
@@ -533,15 +533,15 @@ type Hit<T = Record<string, unknown>> = T & {
|
|
|
533
533
|
*/
|
|
534
534
|
_highlightResult?: {
|
|
535
535
|
[key: string]: HighlightResult;
|
|
536
|
-
};
|
|
536
|
+
} | undefined;
|
|
537
537
|
/**
|
|
538
538
|
* Snippets that show the context around a matching search query.
|
|
539
539
|
*/
|
|
540
540
|
_snippetResult?: {
|
|
541
541
|
[key: string]: SnippetResult;
|
|
542
|
-
};
|
|
543
|
-
_rankingInfo?: RankingInfo;
|
|
544
|
-
_distinctSeqID?: number;
|
|
542
|
+
} | undefined;
|
|
543
|
+
_rankingInfo?: RankingInfo | undefined;
|
|
544
|
+
_distinctSeqID?: number | undefined;
|
|
545
545
|
};
|
|
546
546
|
|
|
547
547
|
type SearchHits<T = Record<string, unknown>> = Record<string, any> & {
|
|
@@ -608,19 +608,19 @@ type StandardEntries = {
|
|
|
608
608
|
*/
|
|
609
609
|
plurals?: {
|
|
610
610
|
[key: string]: boolean;
|
|
611
|
-
} | null;
|
|
611
|
+
} | null | undefined;
|
|
612
612
|
/**
|
|
613
613
|
* Key-value pair of a language ISO code and a boolean value.
|
|
614
614
|
*/
|
|
615
615
|
stopwords?: {
|
|
616
616
|
[key: string]: boolean;
|
|
617
|
-
} | null;
|
|
617
|
+
} | null | undefined;
|
|
618
618
|
/**
|
|
619
619
|
* Key-value pair of a language ISO code and a boolean value.
|
|
620
620
|
*/
|
|
621
621
|
compounds?: {
|
|
622
622
|
[key: string]: boolean;
|
|
623
|
-
} | null;
|
|
623
|
+
} | null | undefined;
|
|
624
624
|
};
|
|
625
625
|
|
|
626
626
|
/**
|
|
@@ -651,15 +651,15 @@ type LogQuery = {
|
|
|
651
651
|
/**
|
|
652
652
|
* Index targeted by the query.
|
|
653
653
|
*/
|
|
654
|
-
index_name?: string;
|
|
654
|
+
index_name?: string | undefined;
|
|
655
655
|
/**
|
|
656
656
|
* A user identifier.
|
|
657
657
|
*/
|
|
658
|
-
user_token?: string;
|
|
658
|
+
user_token?: string | undefined;
|
|
659
659
|
/**
|
|
660
660
|
* Unique query identifier.
|
|
661
661
|
*/
|
|
662
|
-
query_id?: string;
|
|
662
|
+
query_id?: string | undefined;
|
|
663
663
|
};
|
|
664
664
|
|
|
665
665
|
type Log = {
|
|
@@ -702,7 +702,7 @@ type Log = {
|
|
|
702
702
|
/**
|
|
703
703
|
* Number of API requests.
|
|
704
704
|
*/
|
|
705
|
-
nb_api_calls?: string;
|
|
705
|
+
nb_api_calls?: string | undefined;
|
|
706
706
|
/**
|
|
707
707
|
* Processing time for the query in milliseconds. This doesn\'t include latency due to the network.
|
|
708
708
|
*/
|
|
@@ -710,19 +710,19 @@ type Log = {
|
|
|
710
710
|
/**
|
|
711
711
|
* Index targeted by the query.
|
|
712
712
|
*/
|
|
713
|
-
index?: string;
|
|
713
|
+
index?: string | undefined;
|
|
714
714
|
/**
|
|
715
715
|
* Query parameters sent with the request.
|
|
716
716
|
*/
|
|
717
|
-
query_params?: string;
|
|
717
|
+
query_params?: string | undefined;
|
|
718
718
|
/**
|
|
719
719
|
* Number of search results (hits) returned for the query.
|
|
720
720
|
*/
|
|
721
|
-
query_nb_hits?: string;
|
|
721
|
+
query_nb_hits?: string | undefined;
|
|
722
722
|
/**
|
|
723
723
|
* Queries performed for the given request.
|
|
724
724
|
*/
|
|
725
|
-
inner_queries?: Array<LogQuery
|
|
725
|
+
inner_queries?: Array<LogQuery> | undefined;
|
|
726
726
|
};
|
|
727
727
|
|
|
728
728
|
type GetLogsResponse = {
|
|
@@ -736,7 +736,7 @@ type GetObjectsRequest = {
|
|
|
736
736
|
/**
|
|
737
737
|
* Attributes to retrieve. If not specified, all retrievable attributes are returned.
|
|
738
738
|
*/
|
|
739
|
-
attributesToRetrieve?: Array<string
|
|
739
|
+
attributesToRetrieve?: Array<string> | undefined;
|
|
740
740
|
/**
|
|
741
741
|
* Object ID for the record to retrieve.
|
|
742
742
|
*/
|
|
@@ -758,7 +758,7 @@ type GetObjectsResponse<T = Record<string, unknown>> = {
|
|
|
758
758
|
/**
|
|
759
759
|
* An optional status message.
|
|
760
760
|
*/
|
|
761
|
-
message?: string;
|
|
761
|
+
message?: string | undefined;
|
|
762
762
|
/**
|
|
763
763
|
* Retrieved records.
|
|
764
764
|
*/
|
|
@@ -818,7 +818,7 @@ type HasPendingMappingsResponse = {
|
|
|
818
818
|
*/
|
|
819
819
|
clusters?: {
|
|
820
820
|
[key: string]: Array<string>;
|
|
821
|
-
};
|
|
821
|
+
} | undefined;
|
|
822
822
|
};
|
|
823
823
|
|
|
824
824
|
/**
|
|
@@ -828,7 +828,7 @@ type DictionaryLanguage = {
|
|
|
828
828
|
/**
|
|
829
829
|
* Number of custom dictionary entries.
|
|
830
830
|
*/
|
|
831
|
-
nbCustomEntries?: number;
|
|
831
|
+
nbCustomEntries?: number | undefined;
|
|
832
832
|
};
|
|
833
833
|
|
|
834
834
|
/**
|
|
@@ -897,15 +897,15 @@ type FetchedIndex = {
|
|
|
897
897
|
/**
|
|
898
898
|
* Only present if the index is a replica. Contains the name of the related primary index.
|
|
899
899
|
*/
|
|
900
|
-
primary?: string;
|
|
900
|
+
primary?: string | undefined;
|
|
901
901
|
/**
|
|
902
902
|
* Only present if the index is a primary index with replicas. Contains the names of all linked replicas.
|
|
903
903
|
*/
|
|
904
|
-
replicas?: Array<string
|
|
904
|
+
replicas?: Array<string> | undefined;
|
|
905
905
|
/**
|
|
906
906
|
* Only present if the index is a [virtual replica](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-an-index-alphabetically/#virtual-replicas).
|
|
907
907
|
*/
|
|
908
|
-
virtual?: boolean;
|
|
908
|
+
virtual?: boolean | undefined;
|
|
909
909
|
};
|
|
910
910
|
|
|
911
911
|
type ListIndicesResponse = {
|
|
@@ -916,7 +916,7 @@ type ListIndicesResponse = {
|
|
|
916
916
|
/**
|
|
917
917
|
* Number of pages.
|
|
918
918
|
*/
|
|
919
|
-
nbPages?: number;
|
|
919
|
+
nbPages?: number | undefined;
|
|
920
920
|
};
|
|
921
921
|
|
|
922
922
|
/**
|
|
@@ -988,20 +988,20 @@ type Condition = {
|
|
|
988
988
|
/**
|
|
989
989
|
* Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\".
|
|
990
990
|
*/
|
|
991
|
-
pattern?: string;
|
|
992
|
-
anchoring?: Anchoring;
|
|
991
|
+
pattern?: string | undefined;
|
|
992
|
+
anchoring?: Anchoring | undefined;
|
|
993
993
|
/**
|
|
994
994
|
* Whether the pattern should match plurals, synonyms, and typos.
|
|
995
995
|
*/
|
|
996
|
-
alternatives?: boolean;
|
|
996
|
+
alternatives?: boolean | undefined;
|
|
997
997
|
/**
|
|
998
998
|
* An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters.
|
|
999
999
|
*/
|
|
1000
|
-
context?: string;
|
|
1000
|
+
context?: string | undefined;
|
|
1001
1001
|
/**
|
|
1002
1002
|
* Filters that trigger the rule. You can add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter. You can\'t combine multiple filters with `OR` and you can\'t use numeric filters.
|
|
1003
1003
|
*/
|
|
1004
|
-
filters?: string;
|
|
1004
|
+
filters?: string | undefined;
|
|
1005
1005
|
};
|
|
1006
1006
|
|
|
1007
1007
|
/**
|
|
@@ -1021,11 +1021,11 @@ type Range = {
|
|
|
1021
1021
|
/**
|
|
1022
1022
|
* Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
|
|
1023
1023
|
*/
|
|
1024
|
-
from?: number;
|
|
1024
|
+
from?: number | undefined;
|
|
1025
1025
|
/**
|
|
1026
1026
|
* Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
|
|
1027
1027
|
*/
|
|
1028
|
-
value?: number;
|
|
1028
|
+
value?: number | undefined;
|
|
1029
1029
|
};
|
|
1030
1030
|
|
|
1031
1031
|
/**
|
|
@@ -1074,106 +1074,106 @@ type BaseSearchParamsWithoutQuery = {
|
|
|
1074
1074
|
/**
|
|
1075
1075
|
* Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results.
|
|
1076
1076
|
*/
|
|
1077
|
-
similarQuery?: string;
|
|
1077
|
+
similarQuery?: string | undefined;
|
|
1078
1078
|
/**
|
|
1079
1079
|
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
|
|
1080
1080
|
*/
|
|
1081
|
-
filters?: string;
|
|
1082
|
-
facetFilters?: FacetFilters;
|
|
1083
|
-
optionalFilters?: OptionalFilters;
|
|
1084
|
-
numericFilters?: NumericFilters;
|
|
1085
|
-
tagFilters?: TagFilters;
|
|
1081
|
+
filters?: string | undefined;
|
|
1082
|
+
facetFilters?: FacetFilters | undefined;
|
|
1083
|
+
optionalFilters?: OptionalFilters | undefined;
|
|
1084
|
+
numericFilters?: NumericFilters | undefined;
|
|
1085
|
+
tagFilters?: TagFilters | undefined;
|
|
1086
1086
|
/**
|
|
1087
1087
|
* Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).
|
|
1088
1088
|
*/
|
|
1089
|
-
sumOrFiltersScores?: boolean;
|
|
1089
|
+
sumOrFiltersScores?: boolean | undefined;
|
|
1090
1090
|
/**
|
|
1091
1091
|
* Restricts a search to a subset of your searchable attributes. Attribute names are case-sensitive.
|
|
1092
1092
|
*/
|
|
1093
|
-
restrictSearchableAttributes?: Array<string
|
|
1093
|
+
restrictSearchableAttributes?: Array<string> | undefined;
|
|
1094
1094
|
/**
|
|
1095
1095
|
* Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
|
|
1096
1096
|
*/
|
|
1097
|
-
facets?: Array<string
|
|
1097
|
+
facets?: Array<string> | undefined;
|
|
1098
1098
|
/**
|
|
1099
1099
|
* Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It\'s usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.
|
|
1100
1100
|
*/
|
|
1101
|
-
facetingAfterDistinct?: boolean;
|
|
1101
|
+
facetingAfterDistinct?: boolean | undefined;
|
|
1102
1102
|
/**
|
|
1103
1103
|
* Page of search results to retrieve.
|
|
1104
1104
|
*/
|
|
1105
|
-
page?: number;
|
|
1105
|
+
page?: number | undefined;
|
|
1106
1106
|
/**
|
|
1107
1107
|
* Position of the first hit to retrieve.
|
|
1108
1108
|
*/
|
|
1109
|
-
offset?: number;
|
|
1109
|
+
offset?: number | undefined;
|
|
1110
1110
|
/**
|
|
1111
1111
|
* Number of hits to retrieve (used in combination with `offset`).
|
|
1112
1112
|
*/
|
|
1113
|
-
length?: number;
|
|
1113
|
+
length?: number | undefined;
|
|
1114
1114
|
/**
|
|
1115
1115
|
* Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within a circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
|
|
1116
1116
|
*/
|
|
1117
|
-
aroundLatLng?: string;
|
|
1117
|
+
aroundLatLng?: string | undefined;
|
|
1118
1118
|
/**
|
|
1119
1119
|
* Whether to obtain the coordinates from the request\'s IP address.
|
|
1120
1120
|
*/
|
|
1121
|
-
aroundLatLngViaIP?: boolean;
|
|
1122
|
-
aroundRadius?: AroundRadius;
|
|
1123
|
-
aroundPrecision?: AroundPrecision;
|
|
1121
|
+
aroundLatLngViaIP?: boolean | undefined;
|
|
1122
|
+
aroundRadius?: AroundRadius | undefined;
|
|
1123
|
+
aroundPrecision?: AroundPrecision | undefined;
|
|
1124
1124
|
/**
|
|
1125
1125
|
* Minimum radius (in meters) for a search around a location when `aroundRadius` isn\'t set.
|
|
1126
1126
|
*/
|
|
1127
|
-
minimumAroundRadius?: number;
|
|
1128
|
-
insideBoundingBox?: InsideBoundingBox | null;
|
|
1127
|
+
minimumAroundRadius?: number | undefined;
|
|
1128
|
+
insideBoundingBox?: InsideBoundingBox | null | undefined;
|
|
1129
1129
|
/**
|
|
1130
1130
|
* Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
|
|
1131
1131
|
*/
|
|
1132
|
-
insidePolygon?: Array<Array<number
|
|
1132
|
+
insidePolygon?: Array<Array<number>> | undefined;
|
|
1133
1133
|
/**
|
|
1134
1134
|
* ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
|
|
1135
1135
|
*/
|
|
1136
|
-
naturalLanguages?: Array<SupportedLanguage
|
|
1136
|
+
naturalLanguages?: Array<SupportedLanguage> | undefined;
|
|
1137
1137
|
/**
|
|
1138
1138
|
* Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
|
|
1139
1139
|
*/
|
|
1140
|
-
ruleContexts?: Array<string
|
|
1140
|
+
ruleContexts?: Array<string> | undefined;
|
|
1141
1141
|
/**
|
|
1142
1142
|
* Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
|
|
1143
1143
|
*/
|
|
1144
|
-
personalizationImpact?: number;
|
|
1144
|
+
personalizationImpact?: number | undefined;
|
|
1145
1145
|
/**
|
|
1146
1146
|
* Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
|
|
1147
1147
|
*/
|
|
1148
|
-
userToken?: string;
|
|
1148
|
+
userToken?: string | undefined;
|
|
1149
1149
|
/**
|
|
1150
1150
|
* Whether the search response should include detailed ranking information.
|
|
1151
1151
|
*/
|
|
1152
|
-
getRankingInfo?: boolean;
|
|
1152
|
+
getRankingInfo?: boolean | undefined;
|
|
1153
1153
|
/**
|
|
1154
1154
|
* Whether to take into account an index\'s synonyms for this search.
|
|
1155
1155
|
*/
|
|
1156
|
-
synonyms?: boolean;
|
|
1156
|
+
synonyms?: boolean | undefined;
|
|
1157
1157
|
/**
|
|
1158
1158
|
* Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
|
|
1159
1159
|
*/
|
|
1160
|
-
clickAnalytics?: boolean;
|
|
1160
|
+
clickAnalytics?: boolean | undefined;
|
|
1161
1161
|
/**
|
|
1162
1162
|
* Whether this search will be included in Analytics.
|
|
1163
1163
|
*/
|
|
1164
|
-
analytics?: boolean;
|
|
1164
|
+
analytics?: boolean | undefined;
|
|
1165
1165
|
/**
|
|
1166
1166
|
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1167
1167
|
*/
|
|
1168
|
-
analyticsTags?: Array<string
|
|
1168
|
+
analyticsTags?: Array<string> | undefined;
|
|
1169
1169
|
/**
|
|
1170
1170
|
* Whether to include this search when calculating processing-time percentiles.
|
|
1171
1171
|
*/
|
|
1172
|
-
percentileComputation?: boolean;
|
|
1172
|
+
percentileComputation?: boolean | undefined;
|
|
1173
1173
|
/**
|
|
1174
1174
|
* Whether to enable A/B testing for this search.
|
|
1175
1175
|
*/
|
|
1176
|
-
enableABTest?: boolean;
|
|
1176
|
+
enableABTest?: boolean | undefined;
|
|
1177
1177
|
};
|
|
1178
1178
|
|
|
1179
1179
|
type AdvancedSyntaxFeatures = 'exactPhrase' | 'excludeWords';
|
|
@@ -1234,7 +1234,7 @@ type SemanticSearch = {
|
|
|
1234
1234
|
/**
|
|
1235
1235
|
* Indices from which to collect click and conversion events. If null, the current index and all its replicas are used.
|
|
1236
1236
|
*/
|
|
1237
|
-
eventSources?: Array<string> | null;
|
|
1237
|
+
eventSources?: Array<string> | null | undefined;
|
|
1238
1238
|
};
|
|
1239
1239
|
|
|
1240
1240
|
/**
|
|
@@ -1251,131 +1251,131 @@ type IndexSettingsAsSearchParams = {
|
|
|
1251
1251
|
/**
|
|
1252
1252
|
* Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. Attribute names are case-sensitive. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included.
|
|
1253
1253
|
*/
|
|
1254
|
-
attributesToRetrieve?: Array<string
|
|
1254
|
+
attributesToRetrieve?: Array<string> | undefined;
|
|
1255
1255
|
/**
|
|
1256
1256
|
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
|
|
1257
1257
|
*/
|
|
1258
|
-
ranking?: Array<string
|
|
1258
|
+
ranking?: Array<string> | undefined;
|
|
1259
1259
|
/**
|
|
1260
1260
|
* Relevancy threshold below which less relevant results aren\'t included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results.
|
|
1261
1261
|
*/
|
|
1262
|
-
relevancyStrictness?: number;
|
|
1262
|
+
relevancyStrictness?: number | undefined;
|
|
1263
1263
|
/**
|
|
1264
1264
|
* Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/).
|
|
1265
1265
|
*/
|
|
1266
|
-
attributesToHighlight?: Array<string
|
|
1266
|
+
attributesToHighlight?: Array<string> | undefined;
|
|
1267
1267
|
/**
|
|
1268
1268
|
* Attributes for which to enable snippets. Attribute names are case-sensitive. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted.
|
|
1269
1269
|
*/
|
|
1270
|
-
attributesToSnippet?: Array<string
|
|
1270
|
+
attributesToSnippet?: Array<string> | undefined;
|
|
1271
1271
|
/**
|
|
1272
1272
|
* HTML tag to insert before the highlighted parts in all highlighted results and snippets.
|
|
1273
1273
|
*/
|
|
1274
|
-
highlightPreTag?: string;
|
|
1274
|
+
highlightPreTag?: string | undefined;
|
|
1275
1275
|
/**
|
|
1276
1276
|
* HTML tag to insert after the highlighted parts in all highlighted results and snippets.
|
|
1277
1277
|
*/
|
|
1278
|
-
highlightPostTag?: string;
|
|
1278
|
+
highlightPostTag?: string | undefined;
|
|
1279
1279
|
/**
|
|
1280
1280
|
* String used as an ellipsis indicator when a snippet is truncated.
|
|
1281
1281
|
*/
|
|
1282
|
-
snippetEllipsisText?: string;
|
|
1282
|
+
snippetEllipsisText?: string | undefined;
|
|
1283
1283
|
/**
|
|
1284
1284
|
* Whether to restrict highlighting and snippeting to items that at least partially matched the search query. By default, all items are highlighted and snippeted.
|
|
1285
1285
|
*/
|
|
1286
|
-
restrictHighlightAndSnippetArrays?: boolean;
|
|
1286
|
+
restrictHighlightAndSnippetArrays?: boolean | undefined;
|
|
1287
1287
|
/**
|
|
1288
1288
|
* Number of hits per page.
|
|
1289
1289
|
*/
|
|
1290
|
-
hitsPerPage?: number;
|
|
1290
|
+
hitsPerPage?: number | undefined;
|
|
1291
1291
|
/**
|
|
1292
1292
|
* Minimum number of characters a word in the search query must contain to accept matches with [one typo](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
|
|
1293
1293
|
*/
|
|
1294
|
-
minWordSizefor1Typo?: number;
|
|
1294
|
+
minWordSizefor1Typo?: number | undefined;
|
|
1295
1295
|
/**
|
|
1296
1296
|
* Minimum number of characters a word in the search query must contain to accept matches with [two typos](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#configuring-word-length-for-typos).
|
|
1297
1297
|
*/
|
|
1298
|
-
minWordSizefor2Typos?: number;
|
|
1299
|
-
typoTolerance?: TypoTolerance;
|
|
1298
|
+
minWordSizefor2Typos?: number | undefined;
|
|
1299
|
+
typoTolerance?: TypoTolerance | undefined;
|
|
1300
1300
|
/**
|
|
1301
1301
|
* Whether to allow typos on numbers in the search query. Turn off this setting to reduce the number of irrelevant matches when searching in large sets of similar numbers.
|
|
1302
1302
|
*/
|
|
1303
|
-
allowTyposOnNumericTokens?: boolean;
|
|
1303
|
+
allowTyposOnNumericTokens?: boolean | undefined;
|
|
1304
1304
|
/**
|
|
1305
1305
|
* Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.
|
|
1306
1306
|
*/
|
|
1307
|
-
disableTypoToleranceOnAttributes?: Array<string
|
|
1308
|
-
ignorePlurals?: IgnorePlurals;
|
|
1309
|
-
removeStopWords?: RemoveStopWords;
|
|
1307
|
+
disableTypoToleranceOnAttributes?: Array<string> | undefined;
|
|
1308
|
+
ignorePlurals?: IgnorePlurals | undefined;
|
|
1309
|
+
removeStopWords?: RemoveStopWords | undefined;
|
|
1310
1310
|
/**
|
|
1311
1311
|
* Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
|
|
1312
1312
|
*/
|
|
1313
|
-
queryLanguages?: Array<SupportedLanguage
|
|
1313
|
+
queryLanguages?: Array<SupportedLanguage> | undefined;
|
|
1314
1314
|
/**
|
|
1315
1315
|
* Whether to split compound words in the query into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. Decompounding doesn\'t work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won\'t be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
|
|
1316
1316
|
*/
|
|
1317
|
-
decompoundQuery?: boolean;
|
|
1317
|
+
decompoundQuery?: boolean | undefined;
|
|
1318
1318
|
/**
|
|
1319
1319
|
* Whether to enable rules.
|
|
1320
1320
|
*/
|
|
1321
|
-
enableRules?: boolean;
|
|
1321
|
+
enableRules?: boolean | undefined;
|
|
1322
1322
|
/**
|
|
1323
1323
|
* Whether to enable Personalization.
|
|
1324
1324
|
*/
|
|
1325
|
-
enablePersonalization?: boolean;
|
|
1326
|
-
queryType?: QueryType;
|
|
1327
|
-
removeWordsIfNoResults?: RemoveWordsIfNoResults;
|
|
1328
|
-
mode?: Mode;
|
|
1329
|
-
semanticSearch?: SemanticSearch;
|
|
1325
|
+
enablePersonalization?: boolean | undefined;
|
|
1326
|
+
queryType?: QueryType | undefined;
|
|
1327
|
+
removeWordsIfNoResults?: RemoveWordsIfNoResults | undefined;
|
|
1328
|
+
mode?: Mode | undefined;
|
|
1329
|
+
semanticSearch?: SemanticSearch | undefined;
|
|
1330
1330
|
/**
|
|
1331
1331
|
* Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
|
|
1332
1332
|
*/
|
|
1333
|
-
advancedSyntax?: boolean;
|
|
1334
|
-
optionalWords?: OptionalWords | null;
|
|
1333
|
+
advancedSyntax?: boolean | undefined;
|
|
1334
|
+
optionalWords?: OptionalWords | null | undefined;
|
|
1335
1335
|
/**
|
|
1336
1336
|
* Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
|
|
1337
1337
|
*/
|
|
1338
|
-
disableExactOnAttributes?: Array<string
|
|
1339
|
-
exactOnSingleWordQuery?: ExactOnSingleWordQuery;
|
|
1338
|
+
disableExactOnAttributes?: Array<string> | undefined;
|
|
1339
|
+
exactOnSingleWordQuery?: ExactOnSingleWordQuery | undefined;
|
|
1340
1340
|
/**
|
|
1341
1341
|
* Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.
|
|
1342
1342
|
*/
|
|
1343
|
-
alternativesAsExact?: Array<AlternativesAsExact
|
|
1343
|
+
alternativesAsExact?: Array<AlternativesAsExact> | undefined;
|
|
1344
1344
|
/**
|
|
1345
1345
|
* Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
|
|
1346
1346
|
*/
|
|
1347
|
-
advancedSyntaxFeatures?: Array<AdvancedSyntaxFeatures
|
|
1348
|
-
distinct?: Distinct;
|
|
1347
|
+
advancedSyntaxFeatures?: Array<AdvancedSyntaxFeatures> | undefined;
|
|
1348
|
+
distinct?: Distinct | undefined;
|
|
1349
1349
|
/**
|
|
1350
1350
|
* Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response.
|
|
1351
1351
|
*/
|
|
1352
|
-
replaceSynonymsInHighlight?: boolean;
|
|
1352
|
+
replaceSynonymsInHighlight?: boolean | undefined;
|
|
1353
1353
|
/**
|
|
1354
1354
|
* Minimum proximity score for two matching words. This adjusts the [Proximity ranking criterion](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#proximity) by equally scoring matches that are farther apart. For example, if `minProximity` is 2, neighboring matches and matches with one word between them would have the same score.
|
|
1355
1355
|
*/
|
|
1356
|
-
minProximity?: number;
|
|
1356
|
+
minProximity?: number | undefined;
|
|
1357
1357
|
/**
|
|
1358
1358
|
* Properties to include in the API response of search and browse requests. By default, all response properties are included. To reduce the response size, you can select which properties should be included. An empty list may lead to an empty API response (except properties you can\'t exclude). You can\'t exclude these properties: `message`, `warning`, `cursor`, `abTestVariantID`, or any property added by setting `getRankingInfo` to true. Your search depends on the `hits` field. If you omit this field, searches won\'t return any results. Your UI might also depend on other properties, for example, for pagination. Before restricting the response size, check the impact on your search experience.
|
|
1359
1359
|
*/
|
|
1360
|
-
responseFields?: Array<string
|
|
1360
|
+
responseFields?: Array<string> | undefined;
|
|
1361
1361
|
/**
|
|
1362
1362
|
* Maximum number of facet values to return for each facet.
|
|
1363
1363
|
*/
|
|
1364
|
-
maxValuesPerFacet?: number;
|
|
1364
|
+
maxValuesPerFacet?: number | undefined;
|
|
1365
1365
|
/**
|
|
1366
1366
|
* Order in which to retrieve facet values. - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Retrieve facet values alphabetically. This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
|
|
1367
1367
|
*/
|
|
1368
|
-
sortFacetValuesBy?: string;
|
|
1368
|
+
sortFacetValuesBy?: string | undefined;
|
|
1369
1369
|
/**
|
|
1370
1370
|
* Whether the best matching attribute should be determined by minimum proximity. This setting only affects ranking if the Attribute ranking criterion comes before Proximity in the `ranking` setting. If true, the best matching attribute is selected based on the minimum proximity of multiple matches. Otherwise, the best matching attribute is determined by the order in the `searchableAttributes` setting.
|
|
1371
1371
|
*/
|
|
1372
|
-
attributeCriteriaComputedByMinProximity?: boolean;
|
|
1373
|
-
renderingContent?: RenderingContent;
|
|
1372
|
+
attributeCriteriaComputedByMinProximity?: boolean | undefined;
|
|
1373
|
+
renderingContent?: RenderingContent | undefined;
|
|
1374
1374
|
/**
|
|
1375
1375
|
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/). This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
|
|
1376
1376
|
*/
|
|
1377
|
-
enableReRanking?: boolean;
|
|
1378
|
-
reRankingApplyFilter?: ReRankingApplyFilter | null;
|
|
1377
|
+
enableReRanking?: boolean | undefined;
|
|
1378
|
+
reRankingApplyFilter?: ReRankingApplyFilter | null | undefined;
|
|
1379
1379
|
};
|
|
1380
1380
|
|
|
1381
1381
|
/**
|
|
@@ -1389,11 +1389,11 @@ type AutomaticFacetFilter = {
|
|
|
1389
1389
|
/**
|
|
1390
1390
|
* Filter scores to give different weights to individual filters.
|
|
1391
1391
|
*/
|
|
1392
|
-
score?: number;
|
|
1392
|
+
score?: number | undefined;
|
|
1393
1393
|
/**
|
|
1394
1394
|
* Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation.
|
|
1395
1395
|
*/
|
|
1396
|
-
disjunctive?: boolean;
|
|
1396
|
+
disjunctive?: boolean | undefined;
|
|
1397
1397
|
};
|
|
1398
1398
|
|
|
1399
1399
|
/**
|
|
@@ -1407,26 +1407,26 @@ type AutomaticFacetFilters = Array<AutomaticFacetFilter> | Array<string>;
|
|
|
1407
1407
|
type EditType = 'remove' | 'replace';
|
|
1408
1408
|
|
|
1409
1409
|
type Edit = {
|
|
1410
|
-
type?: EditType;
|
|
1410
|
+
type?: EditType | undefined;
|
|
1411
1411
|
/**
|
|
1412
1412
|
* Text or patterns to remove from the query string.
|
|
1413
1413
|
*/
|
|
1414
|
-
delete?: string;
|
|
1414
|
+
delete?: string | undefined;
|
|
1415
1415
|
/**
|
|
1416
1416
|
* Text to be added in place of the deleted text inside the query string.
|
|
1417
1417
|
*/
|
|
1418
|
-
insert?: string;
|
|
1418
|
+
insert?: string | undefined;
|
|
1419
1419
|
};
|
|
1420
1420
|
|
|
1421
1421
|
type ConsequenceQueryObject = {
|
|
1422
1422
|
/**
|
|
1423
1423
|
* Words to remove from the search query.
|
|
1424
1424
|
*/
|
|
1425
|
-
remove?: Array<string
|
|
1425
|
+
remove?: Array<string> | undefined;
|
|
1426
1426
|
/**
|
|
1427
1427
|
* Changes to make to the search query.
|
|
1428
1428
|
*/
|
|
1429
|
-
edits?: Array<Edit
|
|
1429
|
+
edits?: Array<Edit> | undefined;
|
|
1430
1430
|
};
|
|
1431
1431
|
|
|
1432
1432
|
/**
|
|
@@ -1438,10 +1438,10 @@ type ConsequenceQuery = ConsequenceQueryObject | string;
|
|
|
1438
1438
|
* Parameters to apply to this search. You can use all search parameters, plus special `automaticFacetFilters`, `automaticOptionalFacetFilters`, and `query`.
|
|
1439
1439
|
*/
|
|
1440
1440
|
type Params = {
|
|
1441
|
-
query?: ConsequenceQuery;
|
|
1442
|
-
automaticFacetFilters?: AutomaticFacetFilters;
|
|
1443
|
-
automaticOptionalFacetFilters?: AutomaticFacetFilters;
|
|
1444
|
-
renderingContent?: RenderingContent;
|
|
1441
|
+
query?: ConsequenceQuery | undefined;
|
|
1442
|
+
automaticFacetFilters?: AutomaticFacetFilters | undefined;
|
|
1443
|
+
automaticOptionalFacetFilters?: AutomaticFacetFilters | undefined;
|
|
1444
|
+
renderingContent?: RenderingContent | undefined;
|
|
1445
1445
|
};
|
|
1446
1446
|
|
|
1447
1447
|
type ConsequenceParams = BaseSearchParamsWithoutQuery & IndexSettingsAsSearchParams & Params;
|
|
@@ -1480,23 +1480,23 @@ type Promote = PromoteObjectIDs | PromoteObjectID;
|
|
|
1480
1480
|
* Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences).
|
|
1481
1481
|
*/
|
|
1482
1482
|
type Consequence = {
|
|
1483
|
-
params?: ConsequenceParams;
|
|
1483
|
+
params?: ConsequenceParams | undefined;
|
|
1484
1484
|
/**
|
|
1485
1485
|
* Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each.
|
|
1486
1486
|
*/
|
|
1487
|
-
promote?: Array<Promote
|
|
1487
|
+
promote?: Array<Promote> | undefined;
|
|
1488
1488
|
/**
|
|
1489
1489
|
* Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won\'t be shown.
|
|
1490
1490
|
*/
|
|
1491
|
-
filterPromotes?: boolean;
|
|
1491
|
+
filterPromotes?: boolean | undefined;
|
|
1492
1492
|
/**
|
|
1493
1493
|
* Records you want to hide from the search results.
|
|
1494
1494
|
*/
|
|
1495
|
-
hide?: Array<ConsequenceHide
|
|
1495
|
+
hide?: Array<ConsequenceHide> | undefined;
|
|
1496
1496
|
/**
|
|
1497
1497
|
* A JSON object with custom data that will be appended to the `userData` array in the response. This object isn\'t interpreted by the API and is limited to 1 kB of minified JSON.
|
|
1498
1498
|
*/
|
|
1499
|
-
userData?: Record<string, unknown
|
|
1499
|
+
userData?: Record<string, unknown> | undefined;
|
|
1500
1500
|
};
|
|
1501
1501
|
|
|
1502
1502
|
type TimeRange = {
|
|
@@ -1521,20 +1521,20 @@ type Rule = {
|
|
|
1521
1521
|
/**
|
|
1522
1522
|
* Conditions that trigger a rule. Some consequences require specific conditions or don\'t require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions).
|
|
1523
1523
|
*/
|
|
1524
|
-
conditions?: Array<Condition
|
|
1524
|
+
conditions?: Array<Condition> | undefined;
|
|
1525
1525
|
consequence: Consequence;
|
|
1526
1526
|
/**
|
|
1527
1527
|
* Description of the rule\'s purpose to help you distinguish between different rules.
|
|
1528
1528
|
*/
|
|
1529
|
-
description?: string;
|
|
1529
|
+
description?: string | undefined;
|
|
1530
1530
|
/**
|
|
1531
1531
|
* Whether the rule is active.
|
|
1532
1532
|
*/
|
|
1533
|
-
enabled?: boolean;
|
|
1533
|
+
enabled?: boolean | undefined;
|
|
1534
1534
|
/**
|
|
1535
1535
|
* Time periods when the rule is active.
|
|
1536
1536
|
*/
|
|
1537
|
-
validity?: Array<TimeRange
|
|
1537
|
+
validity?: Array<TimeRange> | undefined;
|
|
1538
1538
|
};
|
|
1539
1539
|
|
|
1540
1540
|
type SaveObjectResponse = {
|
|
@@ -1549,7 +1549,7 @@ type SaveObjectResponse = {
|
|
|
1549
1549
|
/**
|
|
1550
1550
|
* Unique record identifier.
|
|
1551
1551
|
*/
|
|
1552
|
-
objectID?: string;
|
|
1552
|
+
objectID?: string | undefined;
|
|
1553
1553
|
};
|
|
1554
1554
|
|
|
1555
1555
|
type SaveSynonymResponse = {
|
|
@@ -1585,21 +1585,21 @@ type DictionaryEntry = Record<string, any> & {
|
|
|
1585
1585
|
* Unique identifier for the dictionary entry.
|
|
1586
1586
|
*/
|
|
1587
1587
|
objectID: string;
|
|
1588
|
-
language?: SupportedLanguage;
|
|
1588
|
+
language?: SupportedLanguage | undefined;
|
|
1589
1589
|
/**
|
|
1590
1590
|
* Matching dictionary word for `stopwords` and `compounds` dictionaries.
|
|
1591
1591
|
*/
|
|
1592
|
-
word?: string;
|
|
1592
|
+
word?: string | undefined;
|
|
1593
1593
|
/**
|
|
1594
1594
|
* Matching words in the `plurals` dictionary including declensions.
|
|
1595
1595
|
*/
|
|
1596
|
-
words?: Array<string
|
|
1596
|
+
words?: Array<string> | undefined;
|
|
1597
1597
|
/**
|
|
1598
1598
|
* Invividual components of a compound word in the `compounds` dictionary.
|
|
1599
1599
|
*/
|
|
1600
|
-
decomposition?: Array<string
|
|
1601
|
-
state?: DictionaryEntryState;
|
|
1602
|
-
type?: DictionaryEntryType;
|
|
1600
|
+
decomposition?: Array<string> | undefined;
|
|
1601
|
+
state?: DictionaryEntryState | undefined;
|
|
1602
|
+
type?: DictionaryEntryType | undefined;
|
|
1603
1603
|
};
|
|
1604
1604
|
|
|
1605
1605
|
type SearchDictionaryEntriesResponse = {
|
|
@@ -1648,7 +1648,7 @@ type SearchForFacetValuesResponse = {
|
|
|
1648
1648
|
/**
|
|
1649
1649
|
* Time the server took to process the request, in milliseconds.
|
|
1650
1650
|
*/
|
|
1651
|
-
processingTimeMS?: number;
|
|
1651
|
+
processingTimeMS?: number | undefined;
|
|
1652
1652
|
};
|
|
1653
1653
|
|
|
1654
1654
|
/**
|
|
@@ -1668,11 +1668,11 @@ type SearchForFacetsOptions = {
|
|
|
1668
1668
|
/**
|
|
1669
1669
|
* Text to search inside the facet\'s values.
|
|
1670
1670
|
*/
|
|
1671
|
-
facetQuery?: string;
|
|
1671
|
+
facetQuery?: string | undefined;
|
|
1672
1672
|
/**
|
|
1673
1673
|
* Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
|
|
1674
1674
|
*/
|
|
1675
|
-
maxFacetHits?: number;
|
|
1675
|
+
maxFacetHits?: number | undefined;
|
|
1676
1676
|
type: SearchTypeFacet;
|
|
1677
1677
|
};
|
|
1678
1678
|
|
|
@@ -1680,7 +1680,7 @@ type SearchParamsQuery = {
|
|
|
1680
1680
|
/**
|
|
1681
1681
|
* Search query.
|
|
1682
1682
|
*/
|
|
1683
|
-
query?: string;
|
|
1683
|
+
query?: string | undefined;
|
|
1684
1684
|
};
|
|
1685
1685
|
|
|
1686
1686
|
type BaseSearchParams = SearchParamsQuery & BaseSearchParamsWithoutQuery;
|
|
@@ -1697,7 +1697,7 @@ type SearchParamsString = {
|
|
|
1697
1697
|
/**
|
|
1698
1698
|
* Search parameters as a URL-encoded query string.
|
|
1699
1699
|
*/
|
|
1700
|
-
params?: string;
|
|
1700
|
+
params?: string | undefined;
|
|
1701
1701
|
};
|
|
1702
1702
|
|
|
1703
1703
|
type SearchParams = SearchParamsString | SearchParamsObject;
|
|
@@ -1714,11 +1714,11 @@ type SearchForHitsOptions = {
|
|
|
1714
1714
|
* Index name (case-sensitive).
|
|
1715
1715
|
*/
|
|
1716
1716
|
indexName: string;
|
|
1717
|
-
type?: SearchTypeDefault;
|
|
1717
|
+
type?: SearchTypeDefault | undefined;
|
|
1718
1718
|
} & {
|
|
1719
|
-
facet?: never;
|
|
1720
|
-
maxFacetHits?: never;
|
|
1721
|
-
facetQuery?: never;
|
|
1719
|
+
facet?: never | undefined;
|
|
1720
|
+
maxFacetHits?: never | undefined;
|
|
1721
|
+
facetQuery?: never | undefined;
|
|
1722
1722
|
};
|
|
1723
1723
|
|
|
1724
1724
|
type SearchForHits = SearchParams & SearchForHitsOptions;
|
|
@@ -1732,26 +1732,26 @@ type SearchStrategy = 'none' | 'stopIfEnoughMatches';
|
|
|
1732
1732
|
|
|
1733
1733
|
type SearchMethodParams = {
|
|
1734
1734
|
requests: Array<SearchQuery>;
|
|
1735
|
-
strategy?: SearchStrategy;
|
|
1735
|
+
strategy?: SearchStrategy | undefined;
|
|
1736
1736
|
};
|
|
1737
1737
|
|
|
1738
1738
|
type SearchPagination = {
|
|
1739
1739
|
/**
|
|
1740
1740
|
* Page of search results to retrieve.
|
|
1741
1741
|
*/
|
|
1742
|
-
page?: number;
|
|
1742
|
+
page?: number | undefined;
|
|
1743
1743
|
/**
|
|
1744
1744
|
* Number of results (hits).
|
|
1745
1745
|
*/
|
|
1746
|
-
nbHits?: number;
|
|
1746
|
+
nbHits?: number | undefined;
|
|
1747
1747
|
/**
|
|
1748
1748
|
* Number of pages of results.
|
|
1749
1749
|
*/
|
|
1750
|
-
nbPages?: number;
|
|
1750
|
+
nbPages?: number | undefined;
|
|
1751
1751
|
/**
|
|
1752
1752
|
* Number of hits per page.
|
|
1753
1753
|
*/
|
|
1754
|
-
hitsPerPage?: number;
|
|
1754
|
+
hitsPerPage?: number | undefined;
|
|
1755
1755
|
};
|
|
1756
1756
|
|
|
1757
1757
|
type SearchResponse<T = Record<string, unknown>> = BaseSearchResponse & SearchPagination & SearchHits<T>;
|
|
@@ -1798,27 +1798,27 @@ type SynonymHit = {
|
|
|
1798
1798
|
/**
|
|
1799
1799
|
* Words or phrases considered equivalent.
|
|
1800
1800
|
*/
|
|
1801
|
-
synonyms?: Array<string
|
|
1801
|
+
synonyms?: Array<string> | undefined;
|
|
1802
1802
|
/**
|
|
1803
1803
|
* Word or phrase to appear in query strings (for [`onewaysynonym`s](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/one-way-synonyms/)).
|
|
1804
1804
|
*/
|
|
1805
|
-
input?: string;
|
|
1805
|
+
input?: string | undefined;
|
|
1806
1806
|
/**
|
|
1807
1807
|
* Word or phrase to appear in query strings (for [`altcorrection1` and `altcorrection2`](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-alternative-corrections/)).
|
|
1808
1808
|
*/
|
|
1809
|
-
word?: string;
|
|
1809
|
+
word?: string | undefined;
|
|
1810
1810
|
/**
|
|
1811
1811
|
* Words to be matched in records.
|
|
1812
1812
|
*/
|
|
1813
|
-
corrections?: Array<string
|
|
1813
|
+
corrections?: Array<string> | undefined;
|
|
1814
1814
|
/**
|
|
1815
1815
|
* [Placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/) to be put inside records.
|
|
1816
1816
|
*/
|
|
1817
|
-
placeholder?: string;
|
|
1817
|
+
placeholder?: string | undefined;
|
|
1818
1818
|
/**
|
|
1819
1819
|
* Query words that will match the [placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/).
|
|
1820
1820
|
*/
|
|
1821
|
-
replacements?: Array<string
|
|
1821
|
+
replacements?: Array<string> | undefined;
|
|
1822
1822
|
};
|
|
1823
1823
|
|
|
1824
1824
|
type SearchSynonymsResponse = Record<string, any> & {
|
|
@@ -1843,15 +1843,15 @@ type SearchUserIdsParams = {
|
|
|
1843
1843
|
/**
|
|
1844
1844
|
* Cluster name.
|
|
1845
1845
|
*/
|
|
1846
|
-
clusterName?: string;
|
|
1846
|
+
clusterName?: string | undefined;
|
|
1847
1847
|
/**
|
|
1848
1848
|
* Page of search results to retrieve.
|
|
1849
1849
|
*/
|
|
1850
|
-
page?: number;
|
|
1850
|
+
page?: number | undefined;
|
|
1851
1851
|
/**
|
|
1852
1852
|
* Number of hits per page.
|
|
1853
1853
|
*/
|
|
1854
|
-
hitsPerPage?: number;
|
|
1854
|
+
hitsPerPage?: number | undefined;
|
|
1855
1855
|
};
|
|
1856
1856
|
|
|
1857
1857
|
type UserHighlightResult = {
|
|
@@ -1913,63 +1913,63 @@ type BaseIndexSettings = {
|
|
|
1913
1913
|
/**
|
|
1914
1914
|
* Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are attributes that let you categorize search results. They can be used for filtering search results. By default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn\'t evaluate the facet values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
|
|
1915
1915
|
*/
|
|
1916
|
-
attributesForFaceting?: Array<string
|
|
1916
|
+
attributesForFaceting?: Array<string> | undefined;
|
|
1917
1917
|
/**
|
|
1918
1918
|
* Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you\'ll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer be synced with the primary index. **Modifier** - `virtual(\"REPLICA\")`. Create a virtual replica, Virtual replicas don\'t increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
|
|
1919
1919
|
*/
|
|
1920
|
-
replicas?: Array<string
|
|
1920
|
+
replicas?: Array<string> | undefined;
|
|
1921
1921
|
/**
|
|
1922
1922
|
* Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can\'t be guaranteed.
|
|
1923
1923
|
*/
|
|
1924
|
-
paginationLimitedTo?: number;
|
|
1924
|
+
paginationLimitedTo?: number | undefined;
|
|
1925
1925
|
/**
|
|
1926
1926
|
* Attributes that can\'t be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don\'t want to include it in the search results. Attribute names are case-sensitive.
|
|
1927
1927
|
*/
|
|
1928
|
-
unretrievableAttributes?: Array<string
|
|
1928
|
+
unretrievableAttributes?: Array<string> | undefined;
|
|
1929
1929
|
/**
|
|
1930
1930
|
* Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
|
|
1931
1931
|
*/
|
|
1932
|
-
disableTypoToleranceOnWords?: Array<string
|
|
1932
|
+
disableTypoToleranceOnWords?: Array<string> | undefined;
|
|
1933
1933
|
/**
|
|
1934
1934
|
* Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. Attribute names are case-sensitive.
|
|
1935
1935
|
*/
|
|
1936
|
-
attributesToTransliterate?: Array<string
|
|
1936
|
+
attributesToTransliterate?: Array<string> | undefined;
|
|
1937
1937
|
/**
|
|
1938
1938
|
* Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. Attribute names are case-sensitive.
|
|
1939
1939
|
*/
|
|
1940
|
-
camelCaseAttributes?: Array<string
|
|
1940
|
+
camelCaseAttributes?: Array<string> | undefined;
|
|
1941
1941
|
/**
|
|
1942
1942
|
* Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Attribute names are case-sensitive. Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). Decompounding doesn\'t work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won\'t be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
|
|
1943
1943
|
*/
|
|
1944
|
-
decompoundedAttributes?: Record<string, unknown
|
|
1944
|
+
decompoundedAttributes?: Record<string, unknown> | undefined;
|
|
1945
1945
|
/**
|
|
1946
1946
|
* Languages for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
|
|
1947
1947
|
*/
|
|
1948
|
-
indexLanguages?: Array<SupportedLanguage
|
|
1948
|
+
indexLanguages?: Array<SupportedLanguage> | undefined;
|
|
1949
1949
|
/**
|
|
1950
1950
|
* Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). Attribute names are case-sensitive.
|
|
1951
1951
|
*/
|
|
1952
|
-
disablePrefixOnAttributes?: Array<string
|
|
1952
|
+
disablePrefixOnAttributes?: Array<string> | undefined;
|
|
1953
1953
|
/**
|
|
1954
1954
|
* Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered.
|
|
1955
1955
|
*/
|
|
1956
|
-
allowCompressionOfIntegerArray?: boolean;
|
|
1956
|
+
allowCompressionOfIntegerArray?: boolean | undefined;
|
|
1957
1957
|
/**
|
|
1958
1958
|
* Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). Attribute names are case-sensitive. By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. To turn off filtering for all numeric attributes, specify an attribute that doesn\'t exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier** - `equalOnly(\"ATTRIBUTE\")`. Support only filtering based on equality comparisons `=` and `!=`.
|
|
1959
1959
|
*/
|
|
1960
|
-
numericAttributesForFiltering?: Array<string
|
|
1960
|
+
numericAttributesForFiltering?: Array<string> | undefined;
|
|
1961
1961
|
/**
|
|
1962
1962
|
* Control which non-alphanumeric characters are indexed. By default, Algolia ignores [non-alphanumeric characters](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/#handling-non-alphanumeric-characters) like hyphen (`-`), plus (`+`), and parentheses (`(`,`)`). To include such characters, define them with `separatorsToIndex`. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, in a search for \"Disney+\", Algolia considers \"Disney\" and \"+\" as two separate words.
|
|
1963
1963
|
*/
|
|
1964
|
-
separatorsToIndex?: string;
|
|
1964
|
+
separatorsToIndex?: string | undefined;
|
|
1965
1965
|
/**
|
|
1966
1966
|
* Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without a modifier, matches at the beginning of an attribute rank higher than matches at the end.
|
|
1967
1967
|
*/
|
|
1968
|
-
searchableAttributes?: Array<string
|
|
1968
|
+
searchableAttributes?: Array<string> | undefined;
|
|
1969
1969
|
/**
|
|
1970
1970
|
* An object with custom data. You can store up to 32kB as custom data.
|
|
1971
1971
|
*/
|
|
1972
|
-
userData?: any | null;
|
|
1972
|
+
userData?: any | null | undefined;
|
|
1973
1973
|
/**
|
|
1974
1974
|
* Characters and their normalized replacements. This overrides Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
|
|
1975
1975
|
*/
|
|
@@ -1977,23 +1977,23 @@ type BaseIndexSettings = {
|
|
|
1977
1977
|
[key: string]: {
|
|
1978
1978
|
[key: string]: string;
|
|
1979
1979
|
};
|
|
1980
|
-
};
|
|
1980
|
+
} | undefined;
|
|
1981
1981
|
/**
|
|
1982
1982
|
* Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts.
|
|
1983
1983
|
*/
|
|
1984
|
-
attributeForDistinct?: string;
|
|
1984
|
+
attributeForDistinct?: string | undefined;
|
|
1985
1985
|
/**
|
|
1986
1986
|
* Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
|
|
1987
1987
|
*/
|
|
1988
|
-
maxFacetHits?: number;
|
|
1988
|
+
maxFacetHits?: number | undefined;
|
|
1989
1989
|
/**
|
|
1990
1990
|
* Characters for which diacritics should be preserved. By default, Algolia removes diacritics from letters. For example, `é` becomes `e`. If this causes issues in your search, you can specify characters that should keep their diacritics.
|
|
1991
1991
|
*/
|
|
1992
|
-
keepDiacriticsOnCharacters?: string;
|
|
1992
|
+
keepDiacriticsOnCharacters?: string | undefined;
|
|
1993
1993
|
/**
|
|
1994
1994
|
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
|
|
1995
1995
|
*/
|
|
1996
|
-
customRanking?: Array<string
|
|
1996
|
+
customRanking?: Array<string> | undefined;
|
|
1997
1997
|
};
|
|
1998
1998
|
|
|
1999
1999
|
/**
|
|
@@ -2005,7 +2005,7 @@ type WithPrimary = {
|
|
|
2005
2005
|
/**
|
|
2006
2006
|
* Replica indices only: the name of the primary index for this replica.
|
|
2007
2007
|
*/
|
|
2008
|
-
primary?: string;
|
|
2008
|
+
primary?: string | undefined;
|
|
2009
2009
|
};
|
|
2010
2010
|
|
|
2011
2011
|
type SettingsResponse = IndexSettings & WithPrimary;
|
|
@@ -2021,7 +2021,7 @@ type Source = {
|
|
|
2021
2021
|
/**
|
|
2022
2022
|
* Source description.
|
|
2023
2023
|
*/
|
|
2024
|
-
description?: string;
|
|
2024
|
+
description?: string | undefined;
|
|
2025
2025
|
};
|
|
2026
2026
|
|
|
2027
2027
|
type UpdateApiKeyResponse = {
|
|
@@ -2042,15 +2042,15 @@ type UpdatedAtWithObjectIdResponse = {
|
|
|
2042
2042
|
/**
|
|
2043
2043
|
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`.
|
|
2044
2044
|
*/
|
|
2045
|
-
taskID?: number;
|
|
2045
|
+
taskID?: number | undefined;
|
|
2046
2046
|
/**
|
|
2047
2047
|
* Date and time when the object was updated, in RFC 3339 format.
|
|
2048
2048
|
*/
|
|
2049
|
-
updatedAt?: string;
|
|
2049
|
+
updatedAt?: string | undefined;
|
|
2050
2050
|
/**
|
|
2051
2051
|
* Unique record identifier.
|
|
2052
2052
|
*/
|
|
2053
|
-
objectID?: string;
|
|
2053
|
+
objectID?: string | undefined;
|
|
2054
2054
|
};
|
|
2055
2055
|
|
|
2056
2056
|
type ApiKeyOperation = 'add' | 'delete' | 'update';
|
|
@@ -2096,7 +2096,7 @@ type BatchDictionaryEntriesParams = {
|
|
|
2096
2096
|
/**
|
|
2097
2097
|
* Whether to replace all custom entries in the dictionary with the ones sent with this request.
|
|
2098
2098
|
*/
|
|
2099
|
-
clearExistingDictionaryEntries?: boolean;
|
|
2099
|
+
clearExistingDictionaryEntries?: boolean | undefined;
|
|
2100
2100
|
/**
|
|
2101
2101
|
* List of additions and deletions to your dictionaries.
|
|
2102
2102
|
*/
|
|
@@ -2123,23 +2123,23 @@ type BrowseParamsObject = SearchParamsObject & Cursor;
|
|
|
2123
2123
|
type BrowseParams = SearchParamsString | BrowseParamsObject;
|
|
2124
2124
|
|
|
2125
2125
|
type DeleteByParams = {
|
|
2126
|
-
facetFilters?: FacetFilters;
|
|
2126
|
+
facetFilters?: FacetFilters | undefined;
|
|
2127
2127
|
/**
|
|
2128
2128
|
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
|
|
2129
2129
|
*/
|
|
2130
|
-
filters?: string;
|
|
2131
|
-
numericFilters?: NumericFilters;
|
|
2132
|
-
tagFilters?: TagFilters;
|
|
2130
|
+
filters?: string | undefined;
|
|
2131
|
+
numericFilters?: NumericFilters | undefined;
|
|
2132
|
+
tagFilters?: TagFilters | undefined;
|
|
2133
2133
|
/**
|
|
2134
2134
|
* Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within a circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
|
|
2135
2135
|
*/
|
|
2136
|
-
aroundLatLng?: string;
|
|
2137
|
-
aroundRadius?: AroundRadius;
|
|
2138
|
-
insideBoundingBox?: InsideBoundingBox | null;
|
|
2136
|
+
aroundLatLng?: string | undefined;
|
|
2137
|
+
aroundRadius?: AroundRadius | undefined;
|
|
2138
|
+
insideBoundingBox?: InsideBoundingBox | null | undefined;
|
|
2139
2139
|
/**
|
|
2140
2140
|
* Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
|
|
2141
2141
|
*/
|
|
2142
|
-
insidePolygon?: Array<Array<number
|
|
2142
|
+
insidePolygon?: Array<Array<number>> | undefined;
|
|
2143
2143
|
};
|
|
2144
2144
|
|
|
2145
2145
|
type DictionaryType = 'plurals' | 'stopwords' | 'compounds';
|
|
@@ -2162,7 +2162,7 @@ type OperationIndexParams = {
|
|
|
2162
2162
|
/**
|
|
2163
2163
|
* **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules.
|
|
2164
2164
|
*/
|
|
2165
|
-
scope?: Array<ScopeType
|
|
2165
|
+
scope?: Array<ScopeType> | undefined;
|
|
2166
2166
|
};
|
|
2167
2167
|
|
|
2168
2168
|
/**
|
|
@@ -2176,27 +2176,27 @@ type SearchDictionaryEntriesParams = {
|
|
|
2176
2176
|
/**
|
|
2177
2177
|
* Page of search results to retrieve.
|
|
2178
2178
|
*/
|
|
2179
|
-
page?: number;
|
|
2179
|
+
page?: number | undefined;
|
|
2180
2180
|
/**
|
|
2181
2181
|
* Number of hits per page.
|
|
2182
2182
|
*/
|
|
2183
|
-
hitsPerPage?: number;
|
|
2184
|
-
language?: SupportedLanguage;
|
|
2183
|
+
hitsPerPage?: number | undefined;
|
|
2184
|
+
language?: SupportedLanguage | undefined;
|
|
2185
2185
|
};
|
|
2186
2186
|
|
|
2187
2187
|
type SearchForFacetValuesRequest = {
|
|
2188
2188
|
/**
|
|
2189
2189
|
* Search parameters as a URL-encoded query string.
|
|
2190
2190
|
*/
|
|
2191
|
-
params?: string;
|
|
2191
|
+
params?: string | undefined;
|
|
2192
2192
|
/**
|
|
2193
2193
|
* Text to search inside the facet\'s values.
|
|
2194
2194
|
*/
|
|
2195
|
-
facetQuery?: string;
|
|
2195
|
+
facetQuery?: string | undefined;
|
|
2196
2196
|
/**
|
|
2197
2197
|
* Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
|
|
2198
2198
|
*/
|
|
2199
|
-
maxFacetHits?: number;
|
|
2199
|
+
maxFacetHits?: number | undefined;
|
|
2200
2200
|
};
|
|
2201
2201
|
|
|
2202
2202
|
/**
|
|
@@ -2206,64 +2206,64 @@ type SearchRulesParams = {
|
|
|
2206
2206
|
/**
|
|
2207
2207
|
* Search query for rules.
|
|
2208
2208
|
*/
|
|
2209
|
-
query?: string;
|
|
2210
|
-
anchoring?: Anchoring;
|
|
2209
|
+
query?: string | undefined;
|
|
2210
|
+
anchoring?: Anchoring | undefined;
|
|
2211
2211
|
/**
|
|
2212
2212
|
* Only return rules that match the context (exact match).
|
|
2213
2213
|
*/
|
|
2214
|
-
context?: string;
|
|
2214
|
+
context?: string | undefined;
|
|
2215
2215
|
/**
|
|
2216
2216
|
* Requested page of the API response. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
|
|
2217
2217
|
*/
|
|
2218
|
-
page?: number;
|
|
2218
|
+
page?: number | undefined;
|
|
2219
2219
|
/**
|
|
2220
2220
|
* Maximum number of hits per page. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
|
|
2221
2221
|
*/
|
|
2222
|
-
hitsPerPage?: number;
|
|
2222
|
+
hitsPerPage?: number | undefined;
|
|
2223
2223
|
/**
|
|
2224
2224
|
* If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned.
|
|
2225
2225
|
*/
|
|
2226
|
-
enabled?: boolean | null;
|
|
2226
|
+
enabled?: boolean | null | undefined;
|
|
2227
2227
|
};
|
|
2228
2228
|
|
|
2229
2229
|
type SearchSynonymsParams = {
|
|
2230
2230
|
/**
|
|
2231
2231
|
* Search query.
|
|
2232
2232
|
*/
|
|
2233
|
-
query?: string;
|
|
2234
|
-
type?: SynonymType;
|
|
2233
|
+
query?: string | undefined;
|
|
2234
|
+
type?: SynonymType | undefined;
|
|
2235
2235
|
/**
|
|
2236
2236
|
* Page of search results to retrieve.
|
|
2237
2237
|
*/
|
|
2238
|
-
page?: number;
|
|
2238
|
+
page?: number | undefined;
|
|
2239
2239
|
/**
|
|
2240
2240
|
* Number of hits per page.
|
|
2241
2241
|
*/
|
|
2242
|
-
hitsPerPage?: number;
|
|
2242
|
+
hitsPerPage?: number | undefined;
|
|
2243
2243
|
};
|
|
2244
2244
|
|
|
2245
2245
|
type SecuredApiKeyRestrictions = {
|
|
2246
|
-
searchParams?: SearchParamsObject;
|
|
2246
|
+
searchParams?: SearchParamsObject | undefined;
|
|
2247
2247
|
/**
|
|
2248
2248
|
* Filters that apply to every search made with the secured API key. Extra filters added at search time will be combined with `AND`. For example, if you set `group:admin` as fixed filter on your generated API key, and add `groups:visitors` to the search query, the complete set of filters will be `group:admin AND groups:visitors`.
|
|
2249
2249
|
*/
|
|
2250
|
-
filters?: string;
|
|
2250
|
+
filters?: string | undefined;
|
|
2251
2251
|
/**
|
|
2252
2252
|
* Timestamp when the secured API key expires, measured in seconds since the Unix epoch.
|
|
2253
2253
|
*/
|
|
2254
|
-
validUntil?: number;
|
|
2254
|
+
validUntil?: number | undefined;
|
|
2255
2255
|
/**
|
|
2256
2256
|
* Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\".
|
|
2257
2257
|
*/
|
|
2258
|
-
restrictIndices?: Array<string
|
|
2258
|
+
restrictIndices?: Array<string> | undefined;
|
|
2259
2259
|
/**
|
|
2260
2260
|
* IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse.
|
|
2261
2261
|
*/
|
|
2262
|
-
restrictSources?: string;
|
|
2262
|
+
restrictSources?: string | undefined;
|
|
2263
2263
|
/**
|
|
2264
2264
|
* Pseudonymous user identifier to restrict usage of this API key to specific users. By default, rate limits are set based on IP addresses. This can be an issue if many users search from the same IP address. To avoid this, add a user token to each generated API key.
|
|
2265
2265
|
*/
|
|
2266
|
-
userToken?: string;
|
|
2266
|
+
userToken?: string | undefined;
|
|
2267
2267
|
};
|
|
2268
2268
|
|
|
2269
2269
|
/**
|
|
@@ -2331,7 +2331,7 @@ type BrowseProps = {
|
|
|
2331
2331
|
* Name of the index on which to perform the operation.
|
|
2332
2332
|
*/
|
|
2333
2333
|
indexName: string;
|
|
2334
|
-
browseParams?: BrowseParams;
|
|
2334
|
+
browseParams?: BrowseParams | undefined;
|
|
2335
2335
|
};
|
|
2336
2336
|
/**
|
|
2337
2337
|
* Properties for the `clearObjects` method.
|
|
@@ -2353,7 +2353,7 @@ type ClearRulesProps = {
|
|
|
2353
2353
|
/**
|
|
2354
2354
|
* Whether changes are applied to replica indices.
|
|
2355
2355
|
*/
|
|
2356
|
-
forwardToReplicas?: boolean;
|
|
2356
|
+
forwardToReplicas?: boolean | undefined;
|
|
2357
2357
|
};
|
|
2358
2358
|
/**
|
|
2359
2359
|
* Properties for the `clearSynonyms` method.
|
|
@@ -2366,14 +2366,14 @@ type ClearSynonymsProps = {
|
|
|
2366
2366
|
/**
|
|
2367
2367
|
* Whether changes are applied to replica indices.
|
|
2368
2368
|
*/
|
|
2369
|
-
forwardToReplicas?: boolean;
|
|
2369
|
+
forwardToReplicas?: boolean | undefined;
|
|
2370
2370
|
};
|
|
2371
2371
|
/**
|
|
2372
2372
|
* Properties for the `customDelete` method.
|
|
2373
2373
|
*/
|
|
2374
2374
|
type CustomDeleteProps = {
|
|
2375
2375
|
/**
|
|
2376
|
-
* Path of the endpoint,
|
|
2376
|
+
* Path of the endpoint, for example `1/newFeature`.
|
|
2377
2377
|
*/
|
|
2378
2378
|
path: string;
|
|
2379
2379
|
/**
|
|
@@ -2381,14 +2381,14 @@ type CustomDeleteProps = {
|
|
|
2381
2381
|
*/
|
|
2382
2382
|
parameters?: {
|
|
2383
2383
|
[key: string]: any;
|
|
2384
|
-
};
|
|
2384
|
+
} | undefined;
|
|
2385
2385
|
};
|
|
2386
2386
|
/**
|
|
2387
2387
|
* Properties for the `customGet` method.
|
|
2388
2388
|
*/
|
|
2389
2389
|
type CustomGetProps = {
|
|
2390
2390
|
/**
|
|
2391
|
-
* Path of the endpoint,
|
|
2391
|
+
* Path of the endpoint, for example `1/newFeature`.
|
|
2392
2392
|
*/
|
|
2393
2393
|
path: string;
|
|
2394
2394
|
/**
|
|
@@ -2396,14 +2396,14 @@ type CustomGetProps = {
|
|
|
2396
2396
|
*/
|
|
2397
2397
|
parameters?: {
|
|
2398
2398
|
[key: string]: any;
|
|
2399
|
-
};
|
|
2399
|
+
} | undefined;
|
|
2400
2400
|
};
|
|
2401
2401
|
/**
|
|
2402
2402
|
* Properties for the `customPost` method.
|
|
2403
2403
|
*/
|
|
2404
2404
|
type CustomPostProps = {
|
|
2405
2405
|
/**
|
|
2406
|
-
* Path of the endpoint,
|
|
2406
|
+
* Path of the endpoint, for example `1/newFeature`.
|
|
2407
2407
|
*/
|
|
2408
2408
|
path: string;
|
|
2409
2409
|
/**
|
|
@@ -2411,18 +2411,18 @@ type CustomPostProps = {
|
|
|
2411
2411
|
*/
|
|
2412
2412
|
parameters?: {
|
|
2413
2413
|
[key: string]: any;
|
|
2414
|
-
};
|
|
2414
|
+
} | undefined;
|
|
2415
2415
|
/**
|
|
2416
2416
|
* Parameters to send with the custom request.
|
|
2417
2417
|
*/
|
|
2418
|
-
body?: Record<string, unknown
|
|
2418
|
+
body?: Record<string, unknown> | undefined;
|
|
2419
2419
|
};
|
|
2420
2420
|
/**
|
|
2421
2421
|
* Properties for the `customPut` method.
|
|
2422
2422
|
*/
|
|
2423
2423
|
type CustomPutProps = {
|
|
2424
2424
|
/**
|
|
2425
|
-
* Path of the endpoint,
|
|
2425
|
+
* Path of the endpoint, for example `1/newFeature`.
|
|
2426
2426
|
*/
|
|
2427
2427
|
path: string;
|
|
2428
2428
|
/**
|
|
@@ -2430,11 +2430,11 @@ type CustomPutProps = {
|
|
|
2430
2430
|
*/
|
|
2431
2431
|
parameters?: {
|
|
2432
2432
|
[key: string]: any;
|
|
2433
|
-
};
|
|
2433
|
+
} | undefined;
|
|
2434
2434
|
/**
|
|
2435
2435
|
* Parameters to send with the custom request.
|
|
2436
2436
|
*/
|
|
2437
|
-
body?: Record<string, unknown
|
|
2437
|
+
body?: Record<string, unknown> | undefined;
|
|
2438
2438
|
};
|
|
2439
2439
|
/**
|
|
2440
2440
|
* Properties for the `deleteApiKey` method.
|
|
@@ -2492,7 +2492,7 @@ type DeleteRuleProps = {
|
|
|
2492
2492
|
/**
|
|
2493
2493
|
* Whether changes are applied to replica indices.
|
|
2494
2494
|
*/
|
|
2495
|
-
forwardToReplicas?: boolean;
|
|
2495
|
+
forwardToReplicas?: boolean | undefined;
|
|
2496
2496
|
};
|
|
2497
2497
|
/**
|
|
2498
2498
|
* Properties for the `deleteSource` method.
|
|
@@ -2518,7 +2518,7 @@ type DeleteSynonymProps = {
|
|
|
2518
2518
|
/**
|
|
2519
2519
|
* Whether changes are applied to replica indices.
|
|
2520
2520
|
*/
|
|
2521
|
-
forwardToReplicas?: boolean;
|
|
2521
|
+
forwardToReplicas?: boolean | undefined;
|
|
2522
2522
|
};
|
|
2523
2523
|
/**
|
|
2524
2524
|
* Properties for the `getApiKey` method.
|
|
@@ -2545,19 +2545,19 @@ type GetLogsProps = {
|
|
|
2545
2545
|
/**
|
|
2546
2546
|
* First log entry to retrieve. The most recent entries are listed first.
|
|
2547
2547
|
*/
|
|
2548
|
-
offset?: number;
|
|
2548
|
+
offset?: number | undefined;
|
|
2549
2549
|
/**
|
|
2550
2550
|
* Maximum number of entries to retrieve.
|
|
2551
2551
|
*/
|
|
2552
|
-
length?: number;
|
|
2552
|
+
length?: number | undefined;
|
|
2553
2553
|
/**
|
|
2554
2554
|
* Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
|
|
2555
2555
|
*/
|
|
2556
|
-
indexName?: string;
|
|
2556
|
+
indexName?: string | undefined;
|
|
2557
2557
|
/**
|
|
2558
2558
|
* Type of log entries to retrieve. By default, all log entries are retrieved.
|
|
2559
2559
|
*/
|
|
2560
|
-
type?: LogType;
|
|
2560
|
+
type?: LogType | undefined;
|
|
2561
2561
|
};
|
|
2562
2562
|
/**
|
|
2563
2563
|
* Properties for the `getObject` method.
|
|
@@ -2574,7 +2574,7 @@ type GetObjectProps = {
|
|
|
2574
2574
|
/**
|
|
2575
2575
|
* Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won\'t be retrieved unless the request is authenticated with the admin API key.
|
|
2576
2576
|
*/
|
|
2577
|
-
attributesToRetrieve?: Array<string
|
|
2577
|
+
attributesToRetrieve?: Array<string> | undefined;
|
|
2578
2578
|
};
|
|
2579
2579
|
/**
|
|
2580
2580
|
* Properties for the `getRule` method.
|
|
@@ -2640,7 +2640,7 @@ type HasPendingMappingsProps = {
|
|
|
2640
2640
|
/**
|
|
2641
2641
|
* Whether to include the cluster\'s pending mapping state in the response.
|
|
2642
2642
|
*/
|
|
2643
|
-
getClusters?: boolean;
|
|
2643
|
+
getClusters?: boolean | undefined;
|
|
2644
2644
|
};
|
|
2645
2645
|
/**
|
|
2646
2646
|
* Properties for the `listIndices` method.
|
|
@@ -2649,11 +2649,11 @@ type ListIndicesProps = {
|
|
|
2649
2649
|
/**
|
|
2650
2650
|
* Requested page of the API response. If `null`, the API response is not paginated.
|
|
2651
2651
|
*/
|
|
2652
|
-
page?: number;
|
|
2652
|
+
page?: number | undefined;
|
|
2653
2653
|
/**
|
|
2654
2654
|
* Number of hits per page.
|
|
2655
2655
|
*/
|
|
2656
|
-
hitsPerPage?: number;
|
|
2656
|
+
hitsPerPage?: number | undefined;
|
|
2657
2657
|
};
|
|
2658
2658
|
/**
|
|
2659
2659
|
* Properties for the `listUserIds` method.
|
|
@@ -2662,11 +2662,11 @@ type ListUserIdsProps = {
|
|
|
2662
2662
|
/**
|
|
2663
2663
|
* Requested page of the API response. If `null`, the API response is not paginated.
|
|
2664
2664
|
*/
|
|
2665
|
-
page?: number;
|
|
2665
|
+
page?: number | undefined;
|
|
2666
2666
|
/**
|
|
2667
2667
|
* Number of hits per page.
|
|
2668
2668
|
*/
|
|
2669
|
-
hitsPerPage?: number;
|
|
2669
|
+
hitsPerPage?: number | undefined;
|
|
2670
2670
|
};
|
|
2671
2671
|
/**
|
|
2672
2672
|
* Properties for the `operationIndex` method.
|
|
@@ -2697,7 +2697,7 @@ type PartialUpdateObjectProps = {
|
|
|
2697
2697
|
/**
|
|
2698
2698
|
* Whether to create a new record if it doesn\'t exist.
|
|
2699
2699
|
*/
|
|
2700
|
-
createIfNotExists?: boolean;
|
|
2700
|
+
createIfNotExists?: boolean | undefined;
|
|
2701
2701
|
};
|
|
2702
2702
|
/**
|
|
2703
2703
|
* Properties for the `removeUserId` method.
|
|
@@ -2755,7 +2755,7 @@ type SaveRuleProps = {
|
|
|
2755
2755
|
/**
|
|
2756
2756
|
* Whether changes are applied to replica indices.
|
|
2757
2757
|
*/
|
|
2758
|
-
forwardToReplicas?: boolean;
|
|
2758
|
+
forwardToReplicas?: boolean | undefined;
|
|
2759
2759
|
};
|
|
2760
2760
|
/**
|
|
2761
2761
|
* Properties for the `saveRules` method.
|
|
@@ -2769,11 +2769,11 @@ type SaveRulesProps = {
|
|
|
2769
2769
|
/**
|
|
2770
2770
|
* Whether changes are applied to replica indices.
|
|
2771
2771
|
*/
|
|
2772
|
-
forwardToReplicas?: boolean;
|
|
2772
|
+
forwardToReplicas?: boolean | undefined;
|
|
2773
2773
|
/**
|
|
2774
2774
|
* Whether existing rules should be deleted before adding this batch.
|
|
2775
2775
|
*/
|
|
2776
|
-
clearExistingRules?: boolean;
|
|
2776
|
+
clearExistingRules?: boolean | undefined;
|
|
2777
2777
|
};
|
|
2778
2778
|
/**
|
|
2779
2779
|
* Properties for the `saveSynonym` method.
|
|
@@ -2791,7 +2791,7 @@ type SaveSynonymProps = {
|
|
|
2791
2791
|
/**
|
|
2792
2792
|
* Whether changes are applied to replica indices.
|
|
2793
2793
|
*/
|
|
2794
|
-
forwardToReplicas?: boolean;
|
|
2794
|
+
forwardToReplicas?: boolean | undefined;
|
|
2795
2795
|
};
|
|
2796
2796
|
/**
|
|
2797
2797
|
* Properties for the `saveSynonyms` method.
|
|
@@ -2805,11 +2805,11 @@ type SaveSynonymsProps = {
|
|
|
2805
2805
|
/**
|
|
2806
2806
|
* Whether changes are applied to replica indices.
|
|
2807
2807
|
*/
|
|
2808
|
-
forwardToReplicas?: boolean;
|
|
2808
|
+
forwardToReplicas?: boolean | undefined;
|
|
2809
2809
|
/**
|
|
2810
2810
|
* Whether to replace all synonyms in the index with the ones sent with this request.
|
|
2811
2811
|
*/
|
|
2812
|
-
replaceExistingSynonyms?: boolean;
|
|
2812
|
+
replaceExistingSynonyms?: boolean | undefined;
|
|
2813
2813
|
};
|
|
2814
2814
|
/**
|
|
2815
2815
|
* In v4, the search parameters are wrapped in a `params` parameter.
|
|
@@ -2817,7 +2817,7 @@ type SaveSynonymsProps = {
|
|
|
2817
2817
|
* @deprecated The `search` method now accepts flat `searchParams` at the root of the method.
|
|
2818
2818
|
*/
|
|
2819
2819
|
type LegacySearchParams = {
|
|
2820
|
-
params?: SearchParamsObject;
|
|
2820
|
+
params?: SearchParamsObject | undefined;
|
|
2821
2821
|
};
|
|
2822
2822
|
/**
|
|
2823
2823
|
* In v4, the search parameters are wrapped in a `params` parameter.
|
|
@@ -2860,7 +2860,7 @@ type SearchForFacetValuesProps = {
|
|
|
2860
2860
|
* Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
|
|
2861
2861
|
*/
|
|
2862
2862
|
facetName: string;
|
|
2863
|
-
searchForFacetValuesRequest?: SearchForFacetValuesRequest;
|
|
2863
|
+
searchForFacetValuesRequest?: SearchForFacetValuesRequest | undefined;
|
|
2864
2864
|
};
|
|
2865
2865
|
/**
|
|
2866
2866
|
* Properties for the `searchRules` method.
|
|
@@ -2870,7 +2870,7 @@ type SearchRulesProps = {
|
|
|
2870
2870
|
* Name of the index on which to perform the operation.
|
|
2871
2871
|
*/
|
|
2872
2872
|
indexName: string;
|
|
2873
|
-
searchRulesParams?: SearchRulesParams;
|
|
2873
|
+
searchRulesParams?: SearchRulesParams | undefined;
|
|
2874
2874
|
};
|
|
2875
2875
|
/**
|
|
2876
2876
|
* Properties for the `searchSingleIndex` method.
|
|
@@ -2880,7 +2880,7 @@ type SearchSingleIndexProps = {
|
|
|
2880
2880
|
* Name of the index on which to perform the operation.
|
|
2881
2881
|
*/
|
|
2882
2882
|
indexName: string;
|
|
2883
|
-
searchParams?: SearchParams;
|
|
2883
|
+
searchParams?: SearchParams | undefined;
|
|
2884
2884
|
};
|
|
2885
2885
|
/**
|
|
2886
2886
|
* Properties for the `searchSynonyms` method.
|
|
@@ -2893,7 +2893,7 @@ type SearchSynonymsProps = {
|
|
|
2893
2893
|
/**
|
|
2894
2894
|
* Body of the `searchSynonyms` operation.
|
|
2895
2895
|
*/
|
|
2896
|
-
searchSynonymsParams?: SearchSynonymsParams;
|
|
2896
|
+
searchSynonymsParams?: SearchSynonymsParams | undefined;
|
|
2897
2897
|
};
|
|
2898
2898
|
/**
|
|
2899
2899
|
* Properties for the `setSettings` method.
|
|
@@ -2907,7 +2907,7 @@ type SetSettingsProps = {
|
|
|
2907
2907
|
/**
|
|
2908
2908
|
* Whether changes are applied to replica indices.
|
|
2909
2909
|
*/
|
|
2910
|
-
forwardToReplicas?: boolean;
|
|
2910
|
+
forwardToReplicas?: boolean | undefined;
|
|
2911
2911
|
};
|
|
2912
2912
|
/**
|
|
2913
2913
|
* Properties for the `updateApiKey` method.
|
|
@@ -2974,7 +2974,7 @@ type GenerateSecuredApiKeyOptions = {
|
|
|
2974
2974
|
/**
|
|
2975
2975
|
* A set of properties defining the restrictions of the secured API key.
|
|
2976
2976
|
*/
|
|
2977
|
-
restrictions?: SecuredApiKeyRestrictions;
|
|
2977
|
+
restrictions?: SecuredApiKeyRestrictions | undefined;
|
|
2978
2978
|
};
|
|
2979
2979
|
type GetSecuredApiKeyRemainingValidityOptions = {
|
|
2980
2980
|
/**
|
|
@@ -2997,18 +2997,18 @@ type PartialUpdateObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'obje
|
|
|
2997
2997
|
/**
|
|
2998
2998
|
*To be provided if non-existing objects are passed, otherwise, the call will fail.
|
|
2999
2999
|
*/
|
|
3000
|
-
createIfNotExists?: boolean;
|
|
3000
|
+
createIfNotExists?: boolean | undefined;
|
|
3001
3001
|
};
|
|
3002
3002
|
type SaveObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects' | 'waitForTasks' | 'batchSize'>;
|
|
3003
3003
|
type ChunkedBatchOptions = ReplaceAllObjectsOptions & {
|
|
3004
3004
|
/**
|
|
3005
3005
|
* The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
|
|
3006
3006
|
*/
|
|
3007
|
-
action?: Action;
|
|
3007
|
+
action?: Action | undefined;
|
|
3008
3008
|
/**
|
|
3009
3009
|
* Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
3010
3010
|
*/
|
|
3011
|
-
waitForTasks?: boolean;
|
|
3011
|
+
waitForTasks?: boolean | undefined;
|
|
3012
3012
|
};
|
|
3013
3013
|
type ReplaceAllObjectsOptions = {
|
|
3014
3014
|
/**
|
|
@@ -3022,11 +3022,11 @@ type ReplaceAllObjectsOptions = {
|
|
|
3022
3022
|
/**
|
|
3023
3023
|
* The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
|
|
3024
3024
|
*/
|
|
3025
|
-
batchSize?: number;
|
|
3025
|
+
batchSize?: number | undefined;
|
|
3026
3026
|
/**
|
|
3027
3027
|
* The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].
|
|
3028
3028
|
*/
|
|
3029
|
-
scopes?: Array<ScopeType
|
|
3029
|
+
scopes?: Array<ScopeType> | undefined;
|
|
3030
3030
|
};
|
|
3031
3031
|
type AccountCopyIndexOptions = {
|
|
3032
3032
|
/**
|
|
@@ -3047,7 +3047,7 @@ type AccountCopyIndexOptions = {
|
|
|
3047
3047
|
destinationIndexName: string;
|
|
3048
3048
|
};
|
|
3049
3049
|
|
|
3050
|
-
declare const apiClientVersion = "5.
|
|
3050
|
+
declare const apiClientVersion = "5.29.0";
|
|
3051
3051
|
declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
3052
3052
|
transporter: _algolia_client_common.Transporter;
|
|
3053
3053
|
/**
|
|
@@ -3072,7 +3072,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3072
3072
|
* @param segment - The algolia agent (user-agent) segment to add.
|
|
3073
3073
|
* @param version - The version of the agent.
|
|
3074
3074
|
*/
|
|
3075
|
-
addAlgoliaAgent(segment: string, version?: string): void;
|
|
3075
|
+
addAlgoliaAgent(segment: string, version?: string | undefined): void;
|
|
3076
3076
|
/**
|
|
3077
3077
|
* Helper method to switch the API key used to authenticate the requests.
|
|
3078
3078
|
*
|
|
@@ -3093,7 +3093,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3093
3093
|
* @param waitForTaskOptions.timeout - The function to decide how long to wait between retries.
|
|
3094
3094
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
3095
3095
|
*/
|
|
3096
|
-
waitForTask({ indexName, taskID, maxRetries, timeout, }: WaitForTaskOptions, requestOptions?: RequestOptions): Promise<GetTaskResponse>;
|
|
3096
|
+
waitForTask({ indexName, taskID, maxRetries, timeout, }: WaitForTaskOptions, requestOptions?: RequestOptions | undefined): Promise<GetTaskResponse>;
|
|
3097
3097
|
/**
|
|
3098
3098
|
* Helper: Wait for an application-level task to complete for a given `taskID`.
|
|
3099
3099
|
*
|
|
@@ -3104,7 +3104,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3104
3104
|
* @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.
|
|
3105
3105
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
3106
3106
|
*/
|
|
3107
|
-
waitForAppTask({ taskID, maxRetries, timeout, }: WaitForAppTaskOptions, requestOptions?: RequestOptions): Promise<GetTaskResponse>;
|
|
3107
|
+
waitForAppTask({ taskID, maxRetries, timeout, }: WaitForAppTaskOptions, requestOptions?: RequestOptions | undefined): Promise<GetTaskResponse>;
|
|
3108
3108
|
/**
|
|
3109
3109
|
* Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
|
|
3110
3110
|
*
|
|
@@ -3117,7 +3117,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3117
3117
|
* @param waitForApiKeyOptions.timeout - The function to decide how long to wait between retries.
|
|
3118
3118
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getApikey` method and merged with the transporter requestOptions.
|
|
3119
3119
|
*/
|
|
3120
|
-
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: WaitForApiKeyOptions, requestOptions?: RequestOptions): Promise<GetApiKeyResponse | undefined>;
|
|
3120
|
+
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: WaitForApiKeyOptions, requestOptions?: RequestOptions | undefined): Promise<GetApiKeyResponse | undefined>;
|
|
3121
3121
|
/**
|
|
3122
3122
|
* Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index.
|
|
3123
3123
|
*
|
|
@@ -3129,7 +3129,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3129
3129
|
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
3130
3130
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
|
|
3131
3131
|
*/
|
|
3132
|
-
browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: BrowseOptions<BrowseResponse<T>> & BrowseProps, requestOptions?: RequestOptions): Promise<BrowseResponse<T>>;
|
|
3132
|
+
browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: BrowseOptions<BrowseResponse<T>> & BrowseProps, requestOptions?: RequestOptions | undefined): Promise<BrowseResponse<T>>;
|
|
3133
3133
|
/**
|
|
3134
3134
|
* Helper: Iterate on the `searchRules` method of the client to allow aggregating rules of an index.
|
|
3135
3135
|
*
|
|
@@ -3141,7 +3141,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3141
3141
|
* @param browseRules.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
|
|
3142
3142
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
|
|
3143
3143
|
*/
|
|
3144
|
-
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: BrowseOptions<SearchRulesResponse> & SearchRulesProps, requestOptions?: RequestOptions): Promise<SearchRulesResponse>;
|
|
3144
|
+
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: BrowseOptions<SearchRulesResponse> & SearchRulesProps, requestOptions?: RequestOptions | undefined): Promise<SearchRulesResponse>;
|
|
3145
3145
|
/**
|
|
3146
3146
|
* Helper: Iterate on the `searchSynonyms` method of the client to allow aggregating rules of an index.
|
|
3147
3147
|
*
|
|
@@ -3153,7 +3153,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3153
3153
|
* @param browseSynonyms.searchSynonymsParams - The `searchSynonyms` method parameters.
|
|
3154
3154
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
3155
3155
|
*/
|
|
3156
|
-
browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }: BrowseOptions<SearchSynonymsResponse> & SearchSynonymsProps, requestOptions?: RequestOptions): Promise<SearchSynonymsResponse>;
|
|
3156
|
+
browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }: BrowseOptions<SearchSynonymsResponse> & SearchSynonymsProps, requestOptions?: RequestOptions | undefined): Promise<SearchSynonymsResponse>;
|
|
3157
3157
|
/**
|
|
3158
3158
|
* Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
|
|
3159
3159
|
*
|
|
@@ -3178,7 +3178,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3178
3178
|
* @param saveObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
3179
3179
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
3180
3180
|
*/
|
|
3181
|
-
saveObjects({ indexName, objects, waitForTasks, batchSize }: SaveObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
|
|
3181
|
+
saveObjects({ indexName, objects, waitForTasks, batchSize }: SaveObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<BatchResponse[]>;
|
|
3182
3182
|
/**
|
|
3183
3183
|
* Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
|
|
3184
3184
|
*
|
|
@@ -3190,7 +3190,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3190
3190
|
* @param deleteObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
3191
3191
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
|
|
3192
3192
|
*/
|
|
3193
|
-
deleteObjects({ indexName, objectIDs, waitForTasks, batchSize }: DeleteObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
|
|
3193
|
+
deleteObjects({ indexName, objectIDs, waitForTasks, batchSize }: DeleteObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<BatchResponse[]>;
|
|
3194
3194
|
/**
|
|
3195
3195
|
* Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
|
|
3196
3196
|
*
|
|
@@ -3203,7 +3203,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3203
3203
|
* @param partialUpdateObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
|
|
3204
3204
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
|
|
3205
3205
|
*/
|
|
3206
|
-
partialUpdateObjects({ indexName, objects, createIfNotExists, waitForTasks, batchSize }: PartialUpdateObjectsOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
|
|
3206
|
+
partialUpdateObjects({ indexName, objects, createIfNotExists, waitForTasks, batchSize }: PartialUpdateObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<BatchResponse[]>;
|
|
3207
3207
|
/**
|
|
3208
3208
|
* 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.
|
|
3209
3209
|
* See https://api-clients-automation.netlify.app/docs/add-new-api-client#5-helpers for implementation details.
|
|
@@ -3216,7 +3216,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3216
3216
|
* @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].
|
|
3217
3217
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch`, `operationIndex` and `getTask` method and merged with the transporter requestOptions.
|
|
3218
3218
|
*/
|
|
3219
|
-
replaceAllObjects({ indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions): Promise<ReplaceAllObjectsResponse>;
|
|
3219
|
+
replaceAllObjects({ indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions, requestOptions?: RequestOptions | undefined): Promise<ReplaceAllObjectsResponse>;
|
|
3220
3220
|
indexExists({ indexName }: GetSettingsProps): Promise<boolean>;
|
|
3221
3221
|
/**
|
|
3222
3222
|
* Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
|
|
@@ -3226,7 +3226,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3226
3226
|
* @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
|
|
3227
3227
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3228
3228
|
*/
|
|
3229
|
-
searchForHits<T>(searchMethodParams: LegacySearchMethodProps | SearchMethodParams, requestOptions?: RequestOptions): Promise<{
|
|
3229
|
+
searchForHits<T>(searchMethodParams: LegacySearchMethodProps | SearchMethodParams, requestOptions?: RequestOptions | undefined): Promise<{
|
|
3230
3230
|
results: Array<SearchResponse<T>>;
|
|
3231
3231
|
}>;
|
|
3232
3232
|
/**
|
|
@@ -3237,7 +3237,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3237
3237
|
* @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
|
|
3238
3238
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3239
3239
|
*/
|
|
3240
|
-
searchForFacets(searchMethodParams: LegacySearchMethodProps | SearchMethodParams, requestOptions?: RequestOptions): Promise<{
|
|
3240
|
+
searchForFacets(searchMethodParams: LegacySearchMethodProps | SearchMethodParams, requestOptions?: RequestOptions | undefined): Promise<{
|
|
3241
3241
|
results: Array<SearchForFacetValuesResponse>;
|
|
3242
3242
|
}>;
|
|
3243
3243
|
/**
|
|
@@ -3361,7 +3361,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3361
3361
|
/**
|
|
3362
3362
|
* This method lets you send requests to the Algolia REST API.
|
|
3363
3363
|
* @param customDelete - The customDelete object.
|
|
3364
|
-
* @param customDelete.path - Path of the endpoint,
|
|
3364
|
+
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
3365
3365
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
3366
3366
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3367
3367
|
*/
|
|
@@ -3369,7 +3369,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3369
3369
|
/**
|
|
3370
3370
|
* This method lets you send requests to the Algolia REST API.
|
|
3371
3371
|
* @param customGet - The customGet object.
|
|
3372
|
-
* @param customGet.path - Path of the endpoint,
|
|
3372
|
+
* @param customGet.path - Path of the endpoint, for example `1/newFeature`.
|
|
3373
3373
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
3374
3374
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3375
3375
|
*/
|
|
@@ -3377,7 +3377,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3377
3377
|
/**
|
|
3378
3378
|
* This method lets you send requests to the Algolia REST API.
|
|
3379
3379
|
* @param customPost - The customPost object.
|
|
3380
|
-
* @param customPost.path - Path of the endpoint,
|
|
3380
|
+
* @param customPost.path - Path of the endpoint, for example `1/newFeature`.
|
|
3381
3381
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
3382
3382
|
* @param customPost.body - Parameters to send with the custom request.
|
|
3383
3383
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3386,7 +3386,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3386
3386
|
/**
|
|
3387
3387
|
* This method lets you send requests to the Algolia REST API.
|
|
3388
3388
|
* @param customPut - The customPut object.
|
|
3389
|
-
* @param customPut.path - Path of the endpoint,
|
|
3389
|
+
* @param customPut.path - Path of the endpoint, for example `1/newFeature`.
|
|
3390
3390
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
3391
3391
|
* @param customPut.body - Parameters to send with the custom request.
|
|
3392
3392
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -3492,7 +3492,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3492
3492
|
* - settings
|
|
3493
3493
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3494
3494
|
*/
|
|
3495
|
-
getDictionaryLanguages(requestOptions?: RequestOptions): Promise<{
|
|
3495
|
+
getDictionaryLanguages(requestOptions?: RequestOptions | undefined): Promise<{
|
|
3496
3496
|
[key: string]: Languages;
|
|
3497
3497
|
}>;
|
|
3498
3498
|
/**
|
|
@@ -3502,7 +3502,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3502
3502
|
* - settings
|
|
3503
3503
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3504
3504
|
*/
|
|
3505
|
-
getDictionarySettings(requestOptions?: RequestOptions): Promise<GetDictionarySettingsResponse>;
|
|
3505
|
+
getDictionarySettings(requestOptions?: RequestOptions | undefined): Promise<GetDictionarySettingsResponse>;
|
|
3506
3506
|
/**
|
|
3507
3507
|
* The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn\'t appear in the logs itself.
|
|
3508
3508
|
*
|
|
@@ -3565,7 +3565,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3565
3565
|
* - admin
|
|
3566
3566
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3567
3567
|
*/
|
|
3568
|
-
getSources(requestOptions?: RequestOptions): Promise<Array<Source>>;
|
|
3568
|
+
getSources(requestOptions?: RequestOptions | undefined): Promise<Array<Source>>;
|
|
3569
3569
|
/**
|
|
3570
3570
|
* Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
|
|
3571
3571
|
*
|
|
@@ -3597,7 +3597,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3597
3597
|
* @deprecated
|
|
3598
3598
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3599
3599
|
*/
|
|
3600
|
-
getTopUserIds(requestOptions?: RequestOptions): Promise<GetTopUserIdsResponse>;
|
|
3600
|
+
getTopUserIds(requestOptions?: RequestOptions | undefined): Promise<GetTopUserIdsResponse>;
|
|
3601
3601
|
/**
|
|
3602
3602
|
* Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
|
|
3603
3603
|
*
|
|
@@ -3629,7 +3629,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3629
3629
|
* - admin
|
|
3630
3630
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3631
3631
|
*/
|
|
3632
|
-
listApiKeys(requestOptions?: RequestOptions): Promise<ListApiKeysResponse>;
|
|
3632
|
+
listApiKeys(requestOptions?: RequestOptions | undefined): Promise<ListApiKeysResponse>;
|
|
3633
3633
|
/**
|
|
3634
3634
|
* Lists the available clusters in a multi-cluster setup.
|
|
3635
3635
|
*
|
|
@@ -3639,7 +3639,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
3639
3639
|
* @deprecated
|
|
3640
3640
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
3641
3641
|
*/
|
|
3642
|
-
listClusters(requestOptions?: RequestOptions): Promise<ListClustersResponse>;
|
|
3642
|
+
listClusters(requestOptions?: RequestOptions | undefined): Promise<ListClustersResponse>;
|
|
3643
3643
|
/**
|
|
3644
3644
|
* Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
|
|
3645
3645
|
*
|
|
@@ -3920,7 +3920,7 @@ type AttributeToUpdate = string | BuiltInOperation;
|
|
|
3920
3920
|
* Error.
|
|
3921
3921
|
*/
|
|
3922
3922
|
type ErrorBase = Record<string, any> & {
|
|
3923
|
-
message?: string;
|
|
3923
|
+
message?: string | undefined;
|
|
3924
3924
|
};
|
|
3925
3925
|
|
|
3926
3926
|
type EventStatus = 'created' | 'started' | 'retried' | 'failed' | 'succeeded' | 'critical';
|
|
@@ -3947,7 +3947,7 @@ type Event = {
|
|
|
3947
3947
|
batchSize: number;
|
|
3948
3948
|
data?: {
|
|
3949
3949
|
[key: string]: any;
|
|
3950
|
-
} | null;
|
|
3950
|
+
} | null | undefined;
|
|
3951
3951
|
/**
|
|
3952
3952
|
* Date of publish RFC 3339 format.
|
|
3953
3953
|
*/
|
|
@@ -3962,27 +3962,36 @@ type WatchResponse = {
|
|
|
3962
3962
|
/**
|
|
3963
3963
|
* Universally unique identifier (UUID) of an event.
|
|
3964
3964
|
*/
|
|
3965
|
-
eventID?: string;
|
|
3965
|
+
eventID?: string | undefined;
|
|
3966
3966
|
/**
|
|
3967
3967
|
* This field is always null when used with the Push endpoint. When used for a source discover or source validate run, it will include the sampled data of the source.
|
|
3968
3968
|
*/
|
|
3969
|
-
data?: Array<Record<string, unknown
|
|
3969
|
+
data?: Array<Record<string, unknown>> | undefined;
|
|
3970
3970
|
/**
|
|
3971
3971
|
* in case of error, observability events will be added to the response.
|
|
3972
3972
|
*/
|
|
3973
|
-
events?: Array<Event
|
|
3973
|
+
events?: Array<Event> | undefined;
|
|
3974
3974
|
/**
|
|
3975
3975
|
* a message describing the outcome of the operation that has been ran (push, discover or validate) run.
|
|
3976
3976
|
*/
|
|
3977
|
-
message?: string;
|
|
3977
|
+
message?: string | undefined;
|
|
3978
3978
|
/**
|
|
3979
3979
|
* Date of creation in RFC 3339 format.
|
|
3980
3980
|
*/
|
|
3981
|
-
createdAt?: string;
|
|
3981
|
+
createdAt?: string | undefined;
|
|
3982
|
+
};
|
|
3983
|
+
|
|
3984
|
+
type ReplaceAllObjectsWithTransformationResponse = {
|
|
3985
|
+
copyOperationResponse: UpdatedAtResponse;
|
|
3986
|
+
/**
|
|
3987
|
+
* The response of the `push` request(s).
|
|
3988
|
+
*/
|
|
3989
|
+
watchResponses: Array<WatchResponse>;
|
|
3990
|
+
moveOperationResponse: UpdatedAtResponse;
|
|
3982
3991
|
};
|
|
3983
3992
|
|
|
3984
3993
|
type SearchClient = ReturnType<typeof createSearchClient> & SearchClientNodeHelpers;
|
|
3985
3994
|
|
|
3986
|
-
declare function searchClient(appId: string, apiKey: string, options?: ClientOptions): SearchClient;
|
|
3995
|
+
declare function searchClient(appId: string, apiKey: string, options?: ClientOptions | undefined): SearchClient;
|
|
3987
3996
|
|
|
3988
|
-
export { type AccountCopyIndexOptions, type Acl, type Action, type AddApiKeyResponse, type AddOrUpdateObjectProps, type AdvancedSyntaxFeatures, type AlternativesAsExact, type Anchoring, type ApiKey, type ApiKeyOperation, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AssignUserIdParams, type AssignUserIdProps, type AttributeToUpdate, type AutomaticFacetFilter, type AutomaticFacetFilters, type Banner, type BannerImage, type BannerImageUrl, type BannerLink, type BaseGetApiKeyResponse, type BaseIndexSettings, type BaseSearchParams, type BaseSearchParamsWithoutQuery, type BaseSearchResponse, type BatchAssignUserIdsParams, type BatchAssignUserIdsProps, type BatchDictionaryEntriesParams, type BatchDictionaryEntriesProps, type BatchDictionaryEntriesRequest, type BatchParams, type BatchProps, type BatchRequest, type BatchResponse, type BatchWriteParams, type BooleanString, type BrowseOptions, type BrowsePagination, type BrowseParams, type BrowseParamsObject, type BrowseProps, type BrowseResponse, type BuiltInOperation, type BuiltInOperationType, type BuiltInOperationValue, type ChunkedBatchOptions, type ClearObjectsProps, type ClearRulesProps, type ClearSynonymsProps, type Condition, type Consequence, type ConsequenceHide, type ConsequenceParams, type ConsequenceQuery, type ConsequenceQueryObject, type CreatedAtResponse, type Cursor, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteApiKeyProps, type DeleteApiKeyResponse, type DeleteByParams, type DeleteByProps, type DeleteIndexProps, type DeleteObjectProps, type DeleteObjectsOptions, type DeleteRuleProps, type DeleteSourceProps, type DeleteSourceResponse, type DeleteSynonymProps, type DeletedAtResponse, type DictionaryAction, type DictionaryEntry, type DictionaryEntryState, type DictionaryEntryType, type DictionaryLanguage, type DictionarySettingsParams, type DictionaryType, type Distinct, type Edit, type EditType, type ErrorBase, type Event, type EventStatus, type EventType, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type Facets, type FetchedIndex, type GenerateSecuredApiKeyOptions, type GetApiKeyProps, type GetApiKeyResponse, type GetAppTaskProps, type GetDictionarySettingsResponse, type GetLogsProps, type GetLogsResponse, type GetObjectProps, type GetObjectsParams, type GetObjectsRequest, type GetObjectsResponse, type GetRuleProps, type GetSecuredApiKeyRemainingValidityOptions, type GetSettingsProps, type GetSynonymProps, type GetTaskProps, type GetTaskResponse, type GetTopUserIdsResponse, type GetUserIdProps, type HasPendingMappingsProps, type HasPendingMappingsResponse, type HighlightResult, type HighlightResultOption, type Hit, type IgnorePlurals, type IndexSettings, type IndexSettingsAsSearchParams, type InsideBoundingBox, type Languages, type LegacySearchMethodProps, type ListApiKeysResponse, type ListClustersResponse, type ListIndicesProps, type ListIndicesResponse, type ListUserIdsProps, type ListUserIdsResponse, type Log, type LogQuery, type LogType, type MatchLevel, type MatchedGeoLocation, type Mode, type MultipleBatchRequest, type MultipleBatchResponse, type NumericFilters, type OperationIndexParams, type OperationIndexProps, type OperationType, type OptionalFilters, type OptionalWords, type Params, type PartialUpdateObjectProps, type PartialUpdateObjectsOptions, type Personalization, type Promote, type PromoteObjectID, type PromoteObjectIDs, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RemoveStopWords, type RemoveUserIdProps, type RemoveUserIdResponse, type RemoveWordsIfNoResults, type RenderingContent, type ReplaceAllObjectsOptions, type ReplaceAllObjectsResponse, type ReplaceSourceResponse, type ReplaceSourcesProps, type RestoreApiKeyProps, type Rule, type SaveObjectProps, type SaveObjectResponse, type SaveObjectsOptions, type SaveRuleProps, type SaveRulesProps, type SaveSynonymProps, type SaveSynonymResponse, type SaveSynonymsProps, type ScopeType, type SearchClient, type SearchClientNodeHelpers, type SearchDictionaryEntriesParams, type SearchDictionaryEntriesProps, type SearchDictionaryEntriesResponse, type SearchForFacetValuesProps, type SearchForFacetValuesRequest, type SearchForFacetValuesResponse, type SearchForFacets, type SearchForFacetsOptions, type SearchForHits, type SearchForHitsOptions, type SearchHits, type SearchMethodParams, type SearchPagination, type SearchParams, type SearchParamsObject, type SearchParamsQuery, type SearchParamsString, type SearchQuery, type SearchResponse, type SearchResponses, type SearchResult, type SearchRulesParams, type SearchRulesProps, type SearchRulesResponse, type SearchSingleIndexProps, type SearchStrategy, type SearchSynonymsParams, type SearchSynonymsProps, type SearchSynonymsResponse, type SearchTypeDefault, type SearchTypeFacet, type SearchUserIdsParams, type SearchUserIdsResponse, type SecuredApiKeyRestrictions, type SemanticSearch, type SetSettingsProps, type SettingsResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type Source, type StandardEntries, type SupportedLanguage, type SynonymHit, type SynonymType, type TagFilters, type TaskStatus, type TimeRange, type TypoTolerance, type TypoToleranceEnum, type UpdateApiKeyProps, type UpdateApiKeyResponse, type UpdatedAtResponse, type UpdatedAtWithObjectIdResponse, type UserHighlightResult, type UserHit, type UserId, type Value, type WaitForApiKeyOptions, type WaitForAppTaskOptions, type WaitForTaskOptions, type WatchResponse, type Widgets, type WithPrimary, apiClientVersion, searchClient };
|
|
3997
|
+
export { type AccountCopyIndexOptions, type Acl, type Action, type AddApiKeyResponse, type AddOrUpdateObjectProps, type AdvancedSyntaxFeatures, type AlternativesAsExact, type Anchoring, type ApiKey, type ApiKeyOperation, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AssignUserIdParams, type AssignUserIdProps, type AttributeToUpdate, type AutomaticFacetFilter, type AutomaticFacetFilters, type Banner, type BannerImage, type BannerImageUrl, type BannerLink, type BaseGetApiKeyResponse, type BaseIndexSettings, type BaseSearchParams, type BaseSearchParamsWithoutQuery, type BaseSearchResponse, type BatchAssignUserIdsParams, type BatchAssignUserIdsProps, type BatchDictionaryEntriesParams, type BatchDictionaryEntriesProps, type BatchDictionaryEntriesRequest, type BatchParams, type BatchProps, type BatchRequest, type BatchResponse, type BatchWriteParams, type BooleanString, type BrowseOptions, type BrowsePagination, type BrowseParams, type BrowseParamsObject, type BrowseProps, type BrowseResponse, type BuiltInOperation, type BuiltInOperationType, type BuiltInOperationValue, type ChunkedBatchOptions, type ClearObjectsProps, type ClearRulesProps, type ClearSynonymsProps, type Condition, type Consequence, type ConsequenceHide, type ConsequenceParams, type ConsequenceQuery, type ConsequenceQueryObject, type CreatedAtResponse, type Cursor, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteApiKeyProps, type DeleteApiKeyResponse, type DeleteByParams, type DeleteByProps, type DeleteIndexProps, type DeleteObjectProps, type DeleteObjectsOptions, type DeleteRuleProps, type DeleteSourceProps, type DeleteSourceResponse, type DeleteSynonymProps, type DeletedAtResponse, type DictionaryAction, type DictionaryEntry, type DictionaryEntryState, type DictionaryEntryType, type DictionaryLanguage, type DictionarySettingsParams, type DictionaryType, type Distinct, type Edit, type EditType, type ErrorBase, type Event, type EventStatus, type EventType, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type Facets, type FetchedIndex, type GenerateSecuredApiKeyOptions, type GetApiKeyProps, type GetApiKeyResponse, type GetAppTaskProps, type GetDictionarySettingsResponse, type GetLogsProps, type GetLogsResponse, type GetObjectProps, type GetObjectsParams, type GetObjectsRequest, type GetObjectsResponse, type GetRuleProps, type GetSecuredApiKeyRemainingValidityOptions, type GetSettingsProps, type GetSynonymProps, type GetTaskProps, type GetTaskResponse, type GetTopUserIdsResponse, type GetUserIdProps, type HasPendingMappingsProps, type HasPendingMappingsResponse, type HighlightResult, type HighlightResultOption, type Hit, type IgnorePlurals, type IndexSettings, type IndexSettingsAsSearchParams, type InsideBoundingBox, type Languages, type LegacySearchMethodProps, type ListApiKeysResponse, type ListClustersResponse, type ListIndicesProps, type ListIndicesResponse, type ListUserIdsProps, type ListUserIdsResponse, type Log, type LogQuery, type LogType, type MatchLevel, type MatchedGeoLocation, type Mode, type MultipleBatchRequest, type MultipleBatchResponse, type NumericFilters, type OperationIndexParams, type OperationIndexProps, type OperationType, type OptionalFilters, type OptionalWords, type Params, type PartialUpdateObjectProps, type PartialUpdateObjectsOptions, type Personalization, type Promote, type PromoteObjectID, type PromoteObjectIDs, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RemoveStopWords, type RemoveUserIdProps, type RemoveUserIdResponse, type RemoveWordsIfNoResults, type RenderingContent, type ReplaceAllObjectsOptions, type ReplaceAllObjectsResponse, type ReplaceAllObjectsWithTransformationResponse, type ReplaceSourceResponse, type ReplaceSourcesProps, type RestoreApiKeyProps, type Rule, type SaveObjectProps, type SaveObjectResponse, type SaveObjectsOptions, type SaveRuleProps, type SaveRulesProps, type SaveSynonymProps, type SaveSynonymResponse, type SaveSynonymsProps, type ScopeType, type SearchClient, type SearchClientNodeHelpers, type SearchDictionaryEntriesParams, type SearchDictionaryEntriesProps, type SearchDictionaryEntriesResponse, type SearchForFacetValuesProps, type SearchForFacetValuesRequest, type SearchForFacetValuesResponse, type SearchForFacets, type SearchForFacetsOptions, type SearchForHits, type SearchForHitsOptions, type SearchHits, type SearchMethodParams, type SearchPagination, type SearchParams, type SearchParamsObject, type SearchParamsQuery, type SearchParamsString, type SearchQuery, type SearchResponse, type SearchResponses, type SearchResult, type SearchRulesParams, type SearchRulesProps, type SearchRulesResponse, type SearchSingleIndexProps, type SearchStrategy, type SearchSynonymsParams, type SearchSynonymsProps, type SearchSynonymsResponse, type SearchTypeDefault, type SearchTypeFacet, type SearchUserIdsParams, type SearchUserIdsResponse, type SecuredApiKeyRestrictions, type SemanticSearch, type SetSettingsProps, type SettingsResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type Source, type StandardEntries, type SupportedLanguage, type SynonymHit, type SynonymType, type TagFilters, type TaskStatus, type TimeRange, type TypoTolerance, type TypoToleranceEnum, type UpdateApiKeyProps, type UpdateApiKeyResponse, type UpdatedAtResponse, type UpdatedAtWithObjectIdResponse, type UserHighlightResult, type UserHit, type UserId, type Value, type WaitForApiKeyOptions, type WaitForAppTaskOptions, type WaitForTaskOptions, type WatchResponse, type Widgets, type WithPrimary, apiClientVersion, searchClient };
|