@algolia/client-search 5.1.0 → 5.2.1
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 +2 -2
- package/dist/builds/browser.d.ts +12 -12
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +14 -14
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-search.cjs +20 -31
- package/dist/client-search.esm.browser.js +26 -36
- package/dist/client-search.esm.node.js +20 -31
- package/dist/client-search.umd.js +2 -2
- package/dist/model/alternativesAsExact.d.ts.map +1 -1
- package/dist/model/baseIndexSettings.d.ts +2 -2
- package/dist/model/baseIndexSettings.d.ts.map +1 -1
- package/dist/model/baseSearchResponse.d.ts +4 -4
- package/dist/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/model/batchRequest.d.ts +1 -1
- package/dist/model/batchRequest.d.ts.map +1 -1
- package/dist/model/browseResponse.d.ts.map +1 -1
- package/dist/model/clientMethodProps.d.ts +5 -6
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/consequenceParams.d.ts.map +1 -1
- package/dist/model/{facetsStats.d.ts → facetStats.d.ts} +2 -2
- package/dist/model/facetStats.d.ts.map +1 -0
- package/dist/model/index.d.ts +1 -1
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/multipleBatchRequest.d.ts +1 -1
- package/dist/model/multipleBatchRequest.d.ts.map +1 -1
- package/dist/model/removeWordsIfNoResults.d.ts.map +1 -1
- package/dist/model/searchResponse.d.ts.map +1 -1
- package/dist/model/searchResult.d.ts.map +1 -1
- package/dist/model/synonymType.d.ts.map +1 -1
- package/dist/src/searchClient.d.ts +16 -16
- package/dist/src/searchClient.d.ts.map +1 -1
- package/model/alternativesAsExact.ts +1 -4
- package/model/baseIndexSettings.ts +2 -2
- package/model/baseSearchResponse.ts +4 -4
- package/model/batchRequest.ts +1 -1
- package/model/browseResponse.ts +1 -4
- package/model/clientMethodProps.ts +8 -17
- package/model/consequenceParams.ts +1 -3
- package/model/{facetsStats.ts → facetStats.ts} +1 -1
- package/model/index.ts +1 -1
- package/model/multipleBatchRequest.ts +1 -1
- package/model/removeWordsIfNoResults.ts +1 -5
- package/model/searchResponse.ts +1 -3
- package/model/searchResult.ts +1 -3
- package/model/synonymType.ts +1 -6
- package/package.json +10 -8
- package/dist/model/facetsStats.d.ts.map +0 -1
|
@@ -6,7 +6,6 @@ import type { Action } from './action';
|
|
|
6
6
|
import type { ApiKey } from './apiKey';
|
|
7
7
|
import type { ApiKeyOperation } from './apiKeyOperation';
|
|
8
8
|
import type { AssignUserIdParams } from './assignUserIdParams';
|
|
9
|
-
import type { AttributeToUpdate } from './attributeToUpdate';
|
|
10
9
|
import type { BatchAssignUserIdsParams } from './batchAssignUserIdsParams';
|
|
11
10
|
import type { BatchDictionaryEntriesParams } from './batchDictionaryEntriesParams';
|
|
12
11
|
import type { BatchWriteParams } from './batchWriteParams';
|
|
@@ -44,7 +43,7 @@ export type AddOrUpdateObjectProps = {
|
|
|
44
43
|
/**
|
|
45
44
|
* The record, a schemaless object with attributes that are useful in the context of search and discovery.
|
|
46
45
|
*/
|
|
47
|
-
body: Record<string,
|
|
46
|
+
body: Record<string, unknown>;
|
|
48
47
|
};
|
|
49
48
|
|
|
50
49
|
/**
|
|
@@ -183,7 +182,7 @@ export type CustomPostProps = {
|
|
|
183
182
|
/**
|
|
184
183
|
* Parameters to send with the custom request.
|
|
185
184
|
*/
|
|
186
|
-
body?: Record<string,
|
|
185
|
+
body?: Record<string, unknown>;
|
|
187
186
|
};
|
|
188
187
|
|
|
189
188
|
/**
|
|
@@ -201,7 +200,7 @@ export type CustomPutProps = {
|
|
|
201
200
|
/**
|
|
202
201
|
* Parameters to send with the custom request.
|
|
203
202
|
*/
|
|
204
|
-
body?: Record<string,
|
|
203
|
+
body?: Record<string, unknown>;
|
|
205
204
|
};
|
|
206
205
|
|
|
207
206
|
/**
|
|
@@ -481,7 +480,7 @@ export type PartialUpdateObjectProps = {
|
|
|
481
480
|
/**
|
|
482
481
|
* Attributes with their values.
|
|
483
482
|
*/
|
|
484
|
-
attributesToUpdate: Record<string,
|
|
483
|
+
attributesToUpdate: Record<string, unknown>;
|
|
485
484
|
/**
|
|
486
485
|
* Whether to create a new record if it doesn\'t exist.
|
|
487
486
|
*/
|
|
@@ -529,7 +528,7 @@ export type SaveObjectProps = {
|
|
|
529
528
|
/**
|
|
530
529
|
* The record, a schemaless object with attributes that are useful in the context of search and discovery.
|
|
531
530
|
*/
|
|
532
|
-
body: Record<string,
|
|
531
|
+
body: Record<string, unknown>;
|
|
533
532
|
};
|
|
534
533
|
|
|
535
534
|
/**
|
|
@@ -731,9 +730,7 @@ export type UpdateApiKeyProps = {
|
|
|
731
730
|
/**
|
|
732
731
|
* The `browseObjects`, `browseRules`, `browseSynonyms` options.
|
|
733
732
|
*/
|
|
734
|
-
export type BrowseOptions<T> = Partial<
|
|
735
|
-
Pick<CreateIterablePromise<T>, 'validate'>
|
|
736
|
-
> &
|
|
733
|
+
export type BrowseOptions<T> = Partial<Pick<CreateIterablePromise<T>, 'validate'>> &
|
|
737
734
|
Required<Pick<CreateIterablePromise<T>, 'aggregator'>>;
|
|
738
735
|
|
|
739
736
|
type WaitForOptions = Partial<{
|
|
@@ -813,20 +810,14 @@ export type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName'> & {
|
|
|
813
810
|
objectIDs: string[];
|
|
814
811
|
};
|
|
815
812
|
|
|
816
|
-
export type PartialUpdateObjectsOptions = Pick<
|
|
817
|
-
ChunkedBatchOptions,
|
|
818
|
-
'indexName' | 'objects'
|
|
819
|
-
> & {
|
|
813
|
+
export type PartialUpdateObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects'> & {
|
|
820
814
|
/**
|
|
821
815
|
*To be provided if non-existing objects are passed, otherwise, the call will fail.
|
|
822
816
|
*/
|
|
823
817
|
createIfNotExists?: boolean;
|
|
824
818
|
};
|
|
825
819
|
|
|
826
|
-
export type SaveObjectsOptions = Pick<
|
|
827
|
-
ChunkedBatchOptions,
|
|
828
|
-
'indexName' | 'objects'
|
|
829
|
-
>;
|
|
820
|
+
export type SaveObjectsOptions = Pick<ChunkedBatchOptions, 'indexName' | 'objects'>;
|
|
830
821
|
|
|
831
822
|
export type ChunkedBatchOptions = ReplaceAllObjectsOptions & {
|
|
832
823
|
/**
|
|
@@ -4,6 +4,4 @@ import type { BaseSearchParamsWithoutQuery } from './baseSearchParamsWithoutQuer
|
|
|
4
4
|
import type { IndexSettingsAsSearchParams } from './indexSettingsAsSearchParams';
|
|
5
5
|
import type { Params } from './params';
|
|
6
6
|
|
|
7
|
-
export type ConsequenceParams = BaseSearchParamsWithoutQuery &
|
|
8
|
-
IndexSettingsAsSearchParams &
|
|
9
|
-
Params;
|
|
7
|
+
export type ConsequenceParams = BaseSearchParamsWithoutQuery & IndexSettingsAsSearchParams & Params;
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
|
3
|
+
export type FacetStats = {
|
|
4
4
|
/**
|
|
5
5
|
* Minimum value in the results.
|
|
6
6
|
*/
|
package/model/index.ts
CHANGED
|
@@ -62,8 +62,8 @@ export * from './exhaustive';
|
|
|
62
62
|
export * from './facetFilters';
|
|
63
63
|
export * from './facetHits';
|
|
64
64
|
export * from './facetOrdering';
|
|
65
|
+
export * from './facetStats';
|
|
65
66
|
export * from './facets';
|
|
66
|
-
export * from './facetsStats';
|
|
67
67
|
export * from './fetchedIndex';
|
|
68
68
|
export * from './getApiKeyResponse';
|
|
69
69
|
export * from './getDictionarySettingsResponse';
|
|
@@ -3,8 +3,4 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
|
|
5
5
|
*/
|
|
6
|
-
export type RemoveWordsIfNoResults =
|
|
7
|
-
| 'allOptional'
|
|
8
|
-
| 'firstWords'
|
|
9
|
-
| 'lastWords'
|
|
10
|
-
| 'none';
|
|
6
|
+
export type RemoveWordsIfNoResults = 'allOptional' | 'firstWords' | 'lastWords' | 'none';
|
package/model/searchResponse.ts
CHANGED
|
@@ -4,6 +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 &
|
|
8
|
-
SearchHits<T> &
|
|
9
|
-
SearchPagination;
|
|
7
|
+
export type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchHits<T> & SearchPagination;
|
package/model/searchResult.ts
CHANGED
|
@@ -3,6 +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>> =
|
|
7
|
-
| SearchForFacetValuesResponse
|
|
8
|
-
| SearchResponse<T>;
|
|
6
|
+
export type SearchResult<T = Record<string, any>> = SearchForFacetValuesResponse | SearchResponse<T>;
|
package/model/synonymType.ts
CHANGED
|
@@ -3,9 +3,4 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* Synonym type.
|
|
5
5
|
*/
|
|
6
|
-
export type SynonymType =
|
|
7
|
-
| 'altcorrection1'
|
|
8
|
-
| 'altcorrection2'
|
|
9
|
-
| 'onewaysynonym'
|
|
10
|
-
| 'placeholder'
|
|
11
|
-
| 'synonym';
|
|
6
|
+
export type SynonymType = 'altcorrection1' | 'altcorrection2' | 'onewaysynonym' | 'placeholder' | 'synonym';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algolia/client-search",
|
|
3
|
-
"version": "5.1
|
|
3
|
+
"version": "5.2.1",
|
|
4
4
|
"description": "JavaScript client for client-search",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,13 +15,15 @@
|
|
|
15
15
|
"import": "./dist/client-search.esm.node.js",
|
|
16
16
|
"module": "./dist/client-search.esm.node.js",
|
|
17
17
|
"require": "./dist/client-search.cjs",
|
|
18
|
-
"default": "./dist/client-search.cjs"
|
|
18
|
+
"default": "./dist/client-search.cjs",
|
|
19
|
+
"types": "./dist/builds/node.d.ts"
|
|
19
20
|
},
|
|
20
21
|
"default": {
|
|
21
22
|
"umd": "./dist/client-search.umd.js",
|
|
22
23
|
"module": "./dist/client-search.esm.browser.js",
|
|
23
24
|
"import": "./dist/client-search.esm.browser.js",
|
|
24
|
-
"default": "./dist/client-search.umd.js"
|
|
25
|
+
"default": "./dist/client-search.umd.js",
|
|
26
|
+
"types": "./dist/builds/browser.d.ts"
|
|
25
27
|
}
|
|
26
28
|
},
|
|
27
29
|
"./src/*": "./src/*.ts",
|
|
@@ -42,13 +44,13 @@
|
|
|
42
44
|
"clean": "rm -rf ./dist || true"
|
|
43
45
|
},
|
|
44
46
|
"dependencies": {
|
|
45
|
-
"@algolia/client-common": "5.1
|
|
46
|
-
"@algolia/requester-browser-xhr": "5.1
|
|
47
|
-
"@algolia/requester-node-http": "5.1
|
|
47
|
+
"@algolia/client-common": "5.2.1",
|
|
48
|
+
"@algolia/requester-browser-xhr": "5.2.1",
|
|
49
|
+
"@algolia/requester-node-http": "5.2.1"
|
|
48
50
|
},
|
|
49
51
|
"devDependencies": {
|
|
50
|
-
"@types/node": "22.
|
|
51
|
-
"rollup": "4.
|
|
52
|
+
"@types/node": "22.5.0",
|
|
53
|
+
"rollup": "4.21.0",
|
|
52
54
|
"typescript": "5.5.4"
|
|
53
55
|
},
|
|
54
56
|
"engines": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"facetsStats.d.ts","sourceRoot":"","sources":["../../model/facetsStats.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC"}
|