@algolia/client-search 5.7.0 → 5.8.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 +5 -6
- package/dist/browser.d.ts +1670 -1650
- package/dist/builds/browser.js +93 -155
- 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 +93 -155
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +88 -150
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +94 -156
- package/dist/builds/node.js.map +1 -1
- package/dist/fetch.d.ts +1423 -1402
- package/dist/node.d.cts +1423 -1402
- package/dist/node.d.ts +1423 -1402
- package/dist/src/searchClient.cjs +86 -148
- package/dist/src/searchClient.cjs.map +1 -1
- package/dist/src/searchClient.js +89 -151
- package/dist/src/searchClient.js.map +1 -1
- package/index.js +1 -1
- package/model/acl.ts +1 -1
- package/model/action.ts +4 -4
- package/model/alternativesAsExact.ts +1 -1
- package/model/anchoring.ts +2 -2
- package/model/apiKey.ts +4 -4
- package/model/aroundPrecision.ts +1 -1
- package/model/aroundRadius.ts +1 -1
- package/model/attributeToUpdate.ts +1 -1
- package/model/automaticFacetFilters.ts +1 -1
- package/model/banner.ts +13 -0
- package/model/bannerImage.ts +12 -0
- package/model/bannerImageUrl.ts +8 -0
- package/model/bannerLink.ts +8 -0
- package/model/banners.ts +10 -0
- package/model/baseIndexSettings.ts +15 -15
- package/model/baseSearchParams.ts +1 -1
- package/model/baseSearchParamsWithoutQuery.ts +8 -8
- package/model/baseSearchResponse.ts +2 -2
- package/model/batchAssignUserIdsParams.ts +1 -1
- package/model/batchDictionaryEntriesParams.ts +1 -1
- package/model/batchParams.ts +1 -1
- package/model/batchResponse.ts +1 -1
- package/model/batchWriteParams.ts +1 -1
- package/model/booleanString.ts +1 -1
- package/model/browseParams.ts +2 -1
- package/model/browseParamsObject.ts +1 -1
- package/model/browseResponse.ts +1 -1
- package/model/builtInOperationType.ts +4 -4
- package/model/builtInOperationValue.ts +1 -1
- package/model/clientMethodProps.ts +50 -34
- package/model/consequence.ts +2 -2
- package/model/consequenceQueryObject.ts +2 -2
- package/model/deleteByParams.ts +3 -3
- package/model/dictionaryEntry.ts +2 -2
- package/model/dictionaryEntryState.ts +1 -1
- package/model/dictionaryType.ts +1 -1
- package/model/facetFilters.ts +1 -1
- package/model/facetOrdering.ts +1 -1
- package/model/facets.ts +1 -1
- package/model/fetchedIndex.ts +1 -1
- package/model/getApiKeyResponse.ts +1 -1
- package/model/getLogsResponse.ts +1 -1
- package/model/getObjectsParams.ts +1 -1
- package/model/getObjectsRequest.ts +1 -1
- package/model/getTopUserIdsResponse.ts +1 -1
- package/model/hasPendingMappingsResponse.ts +1 -1
- package/model/highlightResult.ts +1 -1
- package/model/highlightResultOption.ts +1 -1
- package/model/hit.ts +2 -2
- package/model/ignorePlurals.ts +1 -1
- package/model/index.ts +13 -7
- package/model/indexSettingsAsSearchParams.ts +15 -15
- package/model/listApiKeysResponse.ts +1 -1
- package/model/listClustersResponse.ts +1 -1
- package/model/listIndicesResponse.ts +1 -1
- package/model/listUserIdsResponse.ts +1 -1
- package/model/log.ts +1 -1
- package/model/logType.ts +1 -1
- package/model/matchLevel.ts +1 -1
- package/model/mode.ts +1 -1
- package/model/multipleBatchResponse.ts +2 -2
- package/model/numericFilters.ts +2 -2
- package/model/operationIndexParams.ts +1 -1
- package/model/operationType.ts +1 -1
- package/model/optionalFilters.ts +1 -1
- package/model/promote.ts +1 -1
- package/model/promoteObjectIDs.ts +1 -1
- package/model/queryType.ts +2 -2
- package/model/reRankingApplyFilter.ts +1 -1
- package/model/redirect.ts +1 -1
- package/model/removeStopWords.ts +1 -1
- package/model/removeWordsIfNoResults.ts +1 -1
- package/model/renderingContent.ts +4 -1
- package/model/replaceAllObjectsResponse.ts +1 -1
- package/model/rule.ts +2 -2
- package/model/scopeType.ts +1 -1
- package/model/searchDictionaryEntriesResponse.ts +1 -1
- package/model/searchForFacetValuesResponse.ts +1 -1
- package/model/searchForFacets.ts +1 -1
- package/model/searchForHits.ts +1 -1
- package/model/searchHits.ts +1 -1
- package/model/searchMethodParams.ts +1 -1
- package/model/searchParams.ts +1 -1
- package/model/searchQuery.ts +1 -1
- package/model/searchResponse.ts +1 -1
- package/model/searchResponses.ts +1 -1
- package/model/searchResult.ts +1 -1
- package/model/searchRulesResponse.ts +1 -1
- package/model/searchSynonymsResponse.ts +1 -1
- package/model/searchUserIdsParams.ts +1 -1
- package/model/searchUserIdsResponse.ts +2 -2
- package/model/securedApiKeyRestrictions.ts +1 -1
- package/model/semanticSearch.ts +1 -1
- package/model/snippetResult.ts +1 -1
- package/model/sortRemainingBy.ts +1 -1
- package/model/standardEntries.ts +3 -3
- package/model/supportedLanguage.ts +1 -1
- package/model/synonymHit.ts +3 -3
- package/model/synonymType.ts +1 -1
- package/model/tagFilters.ts +1 -1
- package/model/taskStatus.ts +1 -1
- package/model/typoTolerance.ts +2 -2
- package/model/userHit.ts +1 -1
- package/model/value.ts +2 -2
- package/model/widgets.ts +10 -0
- package/package.json +6 -6
package/model/rule.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type Rule = {
|
|
|
16
16
|
/**
|
|
17
17
|
* 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).
|
|
18
18
|
*/
|
|
19
|
-
conditions?: Condition
|
|
19
|
+
conditions?: Array<Condition>;
|
|
20
20
|
|
|
21
21
|
consequence?: Consequence;
|
|
22
22
|
|
|
@@ -33,5 +33,5 @@ export type Rule = {
|
|
|
33
33
|
/**
|
|
34
34
|
* Time periods when the rule is active.
|
|
35
35
|
*/
|
|
36
|
-
validity?: TimeRange
|
|
36
|
+
validity?: Array<TimeRange>;
|
|
37
37
|
};
|
package/model/scopeType.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
2
|
|
|
3
|
-
export type ScopeType = '
|
|
3
|
+
export type ScopeType = 'settings' | 'synonyms' | 'rules';
|
|
@@ -6,7 +6,7 @@ export type SearchForFacetValuesResponse = {
|
|
|
6
6
|
/**
|
|
7
7
|
* Matching facet values.
|
|
8
8
|
*/
|
|
9
|
-
facetHits: FacetHits
|
|
9
|
+
facetHits: Array<FacetHits>;
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
|
package/model/searchForFacets.ts
CHANGED
package/model/searchForHits.ts
CHANGED
package/model/searchHits.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type SearchHits<T = Record<string, any>> = Record<string, any> & {
|
|
|
6
6
|
/**
|
|
7
7
|
* Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.
|
|
8
8
|
*/
|
|
9
|
-
hits:
|
|
9
|
+
hits: Hit<T>[];
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Search query.
|
package/model/searchParams.ts
CHANGED
package/model/searchQuery.ts
CHANGED
package/model/searchResponse.ts
CHANGED
|
@@ -4,4 +4,4 @@ import type { BaseSearchResponse } from './baseSearchResponse';
|
|
|
4
4
|
import type { SearchHits } from './searchHits';
|
|
5
5
|
import type { SearchPagination } from './searchPagination';
|
|
6
6
|
|
|
7
|
-
export type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchHits<T
|
|
7
|
+
export type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchPagination & SearchHits<T>;
|
package/model/searchResponses.ts
CHANGED
package/model/searchResult.ts
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
import type { SearchForFacetValuesResponse } from './searchForFacetValuesResponse';
|
|
4
4
|
import type { SearchResponse } from './searchResponse';
|
|
5
5
|
|
|
6
|
-
export type SearchResult<T = Record<string, any>> =
|
|
6
|
+
export type SearchResult<T = Record<string, any>> = SearchResponse<T> | SearchForFacetValuesResponse;
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
import type { UserHit } from './userHit';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* userIDs data.
|
|
7
7
|
*/
|
|
8
8
|
export type SearchUserIdsResponse = {
|
|
9
9
|
/**
|
|
10
10
|
* User objects that match the query.
|
|
11
11
|
*/
|
|
12
|
-
hits: UserHit
|
|
12
|
+
hits: Array<UserHit>;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Number of results (hits).
|
|
@@ -18,7 +18,7 @@ export type SecuredApiKeyRestrictions = {
|
|
|
18
18
|
/**
|
|
19
19
|
* 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_\".
|
|
20
20
|
*/
|
|
21
|
-
restrictIndices?: string
|
|
21
|
+
restrictIndices?: Array<string>;
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* 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.
|
package/model/semanticSearch.ts
CHANGED
package/model/snippetResult.ts
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
import type { SnippetResultOption } from './snippetResultOption';
|
|
4
4
|
|
|
5
|
-
export type SnippetResult =
|
|
5
|
+
export type SnippetResult = SnippetResultOption | { [key: string]: SnippetResult } | Array<SnippetResult>;
|
package/model/sortRemainingBy.ts
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Order of facet values that aren\'t explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don\'t show facet values that aren\'t explicitly positioned.
|
|
5
5
|
*/
|
|
6
|
-
export type SortRemainingBy = '
|
|
6
|
+
export type SortRemainingBy = 'count' | 'alpha' | 'hidden';
|
package/model/standardEntries.ts
CHANGED
|
@@ -7,15 +7,15 @@ export type StandardEntries = {
|
|
|
7
7
|
/**
|
|
8
8
|
* Key-value pair of a language ISO code and a boolean value.
|
|
9
9
|
*/
|
|
10
|
-
plurals?:
|
|
10
|
+
plurals?: { [key: string]: boolean } | null;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Key-value pair of a language ISO code and a boolean value.
|
|
14
14
|
*/
|
|
15
|
-
stopwords?:
|
|
15
|
+
stopwords?: { [key: string]: boolean } | null;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Key-value pair of a language ISO code and a boolean value.
|
|
19
19
|
*/
|
|
20
|
-
compounds?:
|
|
20
|
+
compounds?: { [key: string]: boolean } | null;
|
|
21
21
|
};
|
package/model/synonymHit.ts
CHANGED
|
@@ -16,7 +16,7 @@ export type SynonymHit = {
|
|
|
16
16
|
/**
|
|
17
17
|
* Words or phrases considered equivalent.
|
|
18
18
|
*/
|
|
19
|
-
synonyms?: string
|
|
19
|
+
synonyms?: Array<string>;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* 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/)).
|
|
@@ -31,7 +31,7 @@ export type SynonymHit = {
|
|
|
31
31
|
/**
|
|
32
32
|
* Words to be matched in records.
|
|
33
33
|
*/
|
|
34
|
-
corrections?: string
|
|
34
|
+
corrections?: Array<string>;
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* [Placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/) to be put inside records.
|
|
@@ -41,5 +41,5 @@ export type SynonymHit = {
|
|
|
41
41
|
/**
|
|
42
42
|
* 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/).
|
|
43
43
|
*/
|
|
44
|
-
replacements?: string
|
|
44
|
+
replacements?: Array<string>;
|
|
45
45
|
};
|
package/model/synonymType.ts
CHANGED
package/model/tagFilters.ts
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won\'t get a facet count. The same combination and escaping rules apply as for `facetFilters`.
|
|
5
5
|
*/
|
|
6
|
-
export type TagFilters = TagFilters
|
|
6
|
+
export type TagFilters = Array<TagFilters> | string;
|
package/model/taskStatus.ts
CHANGED
package/model/typoTolerance.ts
CHANGED
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
import type { TypoToleranceEnum } from './typoToleranceEnum';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and
|
|
6
|
+
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) are also active.
|
|
7
7
|
*/
|
|
8
|
-
export type TypoTolerance =
|
|
8
|
+
export type TypoTolerance = boolean | TypoToleranceEnum;
|
package/model/userHit.ts
CHANGED
package/model/value.ts
CHANGED
|
@@ -6,12 +6,12 @@ export type Value = {
|
|
|
6
6
|
/**
|
|
7
7
|
* Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
|
|
8
8
|
*/
|
|
9
|
-
order?: string
|
|
9
|
+
order?: Array<string>;
|
|
10
10
|
|
|
11
11
|
sortRemainingBy?: SortRemainingBy;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Hide facet values.
|
|
15
15
|
*/
|
|
16
|
-
hide?: string
|
|
16
|
+
hide?: Array<string>;
|
|
17
17
|
};
|
package/model/widgets.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
import type { Banners } from './banners';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* widgets returned from any rules that are applied to the current search.
|
|
7
|
+
*/
|
|
8
|
+
export type Widgets = {
|
|
9
|
+
banners?: Banners;
|
|
10
|
+
};
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.
|
|
2
|
+
"version": "5.8.0",
|
|
3
3
|
"repository": {
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git+https://github.com/algolia/algoliasearch-client-javascript.git"
|
|
@@ -49,16 +49,16 @@
|
|
|
49
49
|
"index.d.ts"
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@algolia/client-common": "5.
|
|
53
|
-
"@algolia/requester-browser-xhr": "5.
|
|
54
|
-
"@algolia/requester-fetch": "5.
|
|
55
|
-
"@algolia/requester-node-http": "5.
|
|
52
|
+
"@algolia/client-common": "5.8.0",
|
|
53
|
+
"@algolia/requester-browser-xhr": "5.8.0",
|
|
54
|
+
"@algolia/requester-fetch": "5.8.0",
|
|
55
|
+
"@algolia/requester-node-http": "5.8.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@arethetypeswrong/cli": "0.16.4",
|
|
59
59
|
"@types/node": "22.7.4",
|
|
60
60
|
"publint": "0.2.11",
|
|
61
|
-
"rollup": "4.
|
|
61
|
+
"rollup": "4.24.0",
|
|
62
62
|
"tsup": "8.3.0",
|
|
63
63
|
"typescript": "5.6.2"
|
|
64
64
|
},
|