@algolia/client-search 5.0.0-alpha.91 → 5.0.0-alpha.98
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/dist/client-search.cjs +119 -127
- package/dist/client-search.esm.browser.js +162 -146
- package/dist/client-search.esm.node.js +119 -127
- package/dist/client-search.umd.js +2 -2
- package/dist/model/clientMethodProps.d.ts +59 -72
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/highlightResult.d.ts +1 -1
- package/dist/model/highlightResult.d.ts.map +1 -1
- package/dist/model/searchForFacetValuesResponse.d.ts +8 -0
- package/dist/model/searchForFacetValuesResponse.d.ts.map +1 -1
- package/dist/model/searchResponses.d.ts +2 -2
- package/dist/model/searchResponses.d.ts.map +1 -1
- package/dist/model/searchResult.d.ts +1 -1
- package/dist/model/searchResult.d.ts.map +1 -1
- package/dist/model/searchSynonymsParams.d.ts +10 -0
- package/dist/model/searchSynonymsParams.d.ts.map +1 -1
- package/dist/model/snippetResult.d.ts +1 -1
- package/dist/model/snippetResult.d.ts.map +1 -1
- package/dist/model/userHighlightResult.d.ts +2 -8
- package/dist/model/userHighlightResult.d.ts.map +1 -1
- package/dist/src/searchClient.d.ts +53 -55
- package/dist/src/searchClient.d.ts.map +1 -1
- package/model/clientMethodProps.ts +62 -75
- package/model/highlightResult.ts +3 -1
- package/model/searchForFacetValuesResponse.ts +10 -0
- package/model/searchResponses.ts +2 -2
- package/model/searchResult.ts +3 -1
- package/model/searchSynonymsParams.ts +14 -0
- package/model/snippetResult.ts +3 -1
- package/model/userHighlightResult.ts +2 -8
- package/package.json +7 -7
|
@@ -25,7 +25,6 @@ import type { SearchRulesParams } from './searchRulesParams';
|
|
|
25
25
|
import type { SearchSynonymsParams } from './searchSynonymsParams';
|
|
26
26
|
import type { Source } from './source';
|
|
27
27
|
import type { SynonymHit } from './synonymHit';
|
|
28
|
-
import type { SynonymType } from './synonymType';
|
|
29
28
|
|
|
30
29
|
/**
|
|
31
30
|
* Properties for the `addOrUpdateObject` method.
|
|
@@ -101,33 +100,33 @@ export type BrowseProps = {
|
|
|
101
100
|
};
|
|
102
101
|
|
|
103
102
|
/**
|
|
104
|
-
* Properties for the `
|
|
103
|
+
* Properties for the `clearObjects` method.
|
|
105
104
|
*/
|
|
106
|
-
export type
|
|
105
|
+
export type ClearObjectsProps = {
|
|
107
106
|
/**
|
|
108
107
|
* Index on which to perform the request.
|
|
109
108
|
*/
|
|
110
109
|
indexName: string;
|
|
111
|
-
/**
|
|
112
|
-
* Indicates whether changed index settings are forwarded to the replica indices.
|
|
113
|
-
*/
|
|
114
|
-
forwardToReplicas?: boolean;
|
|
115
110
|
};
|
|
116
111
|
|
|
117
112
|
/**
|
|
118
|
-
* Properties for the `
|
|
113
|
+
* Properties for the `clearRules` method.
|
|
119
114
|
*/
|
|
120
|
-
export type
|
|
115
|
+
export type ClearRulesProps = {
|
|
121
116
|
/**
|
|
122
117
|
* Index on which to perform the request.
|
|
123
118
|
*/
|
|
124
119
|
indexName: string;
|
|
120
|
+
/**
|
|
121
|
+
* Indicates whether changed index settings are forwarded to the replica indices.
|
|
122
|
+
*/
|
|
123
|
+
forwardToReplicas?: boolean;
|
|
125
124
|
};
|
|
126
125
|
|
|
127
126
|
/**
|
|
128
|
-
* Properties for the `
|
|
127
|
+
* Properties for the `clearSynonyms` method.
|
|
129
128
|
*/
|
|
130
|
-
export type
|
|
129
|
+
export type ClearSynonymsProps = {
|
|
131
130
|
/**
|
|
132
131
|
* Index on which to perform the request.
|
|
133
132
|
*/
|
|
@@ -139,9 +138,23 @@ export type ClearRulesProps = {
|
|
|
139
138
|
};
|
|
140
139
|
|
|
141
140
|
/**
|
|
142
|
-
* Properties for the `
|
|
141
|
+
* Properties for the `customDelete` method.
|
|
142
|
+
*/
|
|
143
|
+
export type CustomDeleteProps = {
|
|
144
|
+
/**
|
|
145
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
146
|
+
*/
|
|
147
|
+
path: string;
|
|
148
|
+
/**
|
|
149
|
+
* Query parameters to apply to the current query.
|
|
150
|
+
*/
|
|
151
|
+
parameters?: Record<string, any>;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Properties for the `customGet` method.
|
|
143
156
|
*/
|
|
144
|
-
export type
|
|
157
|
+
export type CustomGetProps = {
|
|
145
158
|
/**
|
|
146
159
|
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
147
160
|
*/
|
|
@@ -152,6 +165,42 @@ export type DelProps = {
|
|
|
152
165
|
parameters?: Record<string, any>;
|
|
153
166
|
};
|
|
154
167
|
|
|
168
|
+
/**
|
|
169
|
+
* Properties for the `customPost` method.
|
|
170
|
+
*/
|
|
171
|
+
export type CustomPostProps = {
|
|
172
|
+
/**
|
|
173
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
174
|
+
*/
|
|
175
|
+
path: string;
|
|
176
|
+
/**
|
|
177
|
+
* Query parameters to apply to the current query.
|
|
178
|
+
*/
|
|
179
|
+
parameters?: Record<string, any>;
|
|
180
|
+
/**
|
|
181
|
+
* Parameters to send with the custom request.
|
|
182
|
+
*/
|
|
183
|
+
body?: Record<string, any>;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Properties for the `customPut` method.
|
|
188
|
+
*/
|
|
189
|
+
export type CustomPutProps = {
|
|
190
|
+
/**
|
|
191
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
192
|
+
*/
|
|
193
|
+
path: string;
|
|
194
|
+
/**
|
|
195
|
+
* Query parameters to apply to the current query.
|
|
196
|
+
*/
|
|
197
|
+
parameters?: Record<string, any>;
|
|
198
|
+
/**
|
|
199
|
+
* Parameters to send with the custom request.
|
|
200
|
+
*/
|
|
201
|
+
body?: Record<string, any>;
|
|
202
|
+
};
|
|
203
|
+
|
|
155
204
|
/**
|
|
156
205
|
* Properties for the `deleteApiKey` method.
|
|
157
206
|
*/
|
|
@@ -243,20 +292,6 @@ export type DeleteSynonymProps = {
|
|
|
243
292
|
forwardToReplicas?: boolean;
|
|
244
293
|
};
|
|
245
294
|
|
|
246
|
-
/**
|
|
247
|
-
* Properties for the `get` method.
|
|
248
|
-
*/
|
|
249
|
-
export type GetProps = {
|
|
250
|
-
/**
|
|
251
|
-
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
252
|
-
*/
|
|
253
|
-
path: string;
|
|
254
|
-
/**
|
|
255
|
-
* Query parameters to apply to the current query.
|
|
256
|
-
*/
|
|
257
|
-
parameters?: Record<string, any>;
|
|
258
|
-
};
|
|
259
|
-
|
|
260
295
|
/**
|
|
261
296
|
* Properties for the `getApiKey` method.
|
|
262
297
|
*/
|
|
@@ -440,42 +475,6 @@ export type PartialUpdateObjectProps = {
|
|
|
440
475
|
createIfNotExists?: boolean;
|
|
441
476
|
};
|
|
442
477
|
|
|
443
|
-
/**
|
|
444
|
-
* Properties for the `post` method.
|
|
445
|
-
*/
|
|
446
|
-
export type PostProps = {
|
|
447
|
-
/**
|
|
448
|
-
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
449
|
-
*/
|
|
450
|
-
path: string;
|
|
451
|
-
/**
|
|
452
|
-
* Query parameters to apply to the current query.
|
|
453
|
-
*/
|
|
454
|
-
parameters?: Record<string, any>;
|
|
455
|
-
/**
|
|
456
|
-
* Parameters to send with the custom request.
|
|
457
|
-
*/
|
|
458
|
-
body?: Record<string, any>;
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
/**
|
|
462
|
-
* Properties for the `put` method.
|
|
463
|
-
*/
|
|
464
|
-
export type PutProps = {
|
|
465
|
-
/**
|
|
466
|
-
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
467
|
-
*/
|
|
468
|
-
path: string;
|
|
469
|
-
/**
|
|
470
|
-
* Query parameters to apply to the current query.
|
|
471
|
-
*/
|
|
472
|
-
parameters?: Record<string, any>;
|
|
473
|
-
/**
|
|
474
|
-
* Parameters to send with the custom request.
|
|
475
|
-
*/
|
|
476
|
-
body?: Record<string, any>;
|
|
477
|
-
};
|
|
478
|
-
|
|
479
478
|
/**
|
|
480
479
|
* Properties for the `removeUserId` method.
|
|
481
480
|
*/
|
|
@@ -684,18 +683,6 @@ export type SearchSynonymsProps = {
|
|
|
684
683
|
* Index on which to perform the request.
|
|
685
684
|
*/
|
|
686
685
|
indexName: string;
|
|
687
|
-
/**
|
|
688
|
-
* Search for specific [types of synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms).
|
|
689
|
-
*/
|
|
690
|
-
type?: SynonymType;
|
|
691
|
-
/**
|
|
692
|
-
* Returns the requested page number (the first page is 0). Page size is set by `hitsPerPage`. When null, there\'s no pagination.
|
|
693
|
-
*/
|
|
694
|
-
page?: number;
|
|
695
|
-
/**
|
|
696
|
-
* Maximum number of hits per page.
|
|
697
|
-
*/
|
|
698
|
-
hitsPerPage?: number;
|
|
699
686
|
/**
|
|
700
687
|
* Body of the `searchSynonyms` operation.
|
|
701
688
|
*/
|
package/model/highlightResult.ts
CHANGED
|
@@ -4,4 +4,14 @@ import type { FacetHits } from './facetHits';
|
|
|
4
4
|
|
|
5
5
|
export type SearchForFacetValuesResponse = {
|
|
6
6
|
facetHits: FacetHits[];
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* See the `facetsCount` field of the `exhaustive` object in the response.
|
|
10
|
+
*/
|
|
11
|
+
exhaustiveFacetsCount: boolean;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Time the server took to process the request, in milliseconds.
|
|
15
|
+
*/
|
|
16
|
+
processingTimeMS?: number;
|
|
7
17
|
};
|
package/model/searchResponses.ts
CHANGED
package/model/searchResult.ts
CHANGED
|
@@ -3,4 +3,6 @@
|
|
|
3
3
|
import type { SearchForFacetValuesResponse } from './searchForFacetValuesResponse';
|
|
4
4
|
import type { SearchResponse } from './searchResponse';
|
|
5
5
|
|
|
6
|
-
export type SearchResult =
|
|
6
|
+
export type SearchResult<T = Record<string, any>> =
|
|
7
|
+
| SearchForFacetValuesResponse
|
|
8
|
+
| SearchResponse<T>;
|
|
@@ -1,8 +1,22 @@
|
|
|
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
|
+
import type { SynonymType } from './synonymType';
|
|
4
|
+
|
|
3
5
|
export type SearchSynonymsParams = {
|
|
4
6
|
/**
|
|
5
7
|
* Text to search for in an index.
|
|
6
8
|
*/
|
|
7
9
|
query?: string;
|
|
10
|
+
|
|
11
|
+
type?: SynonymType;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Page to retrieve (the first page is `0`, not `1`).
|
|
15
|
+
*/
|
|
16
|
+
page?: number;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Number of hits per page.
|
|
20
|
+
*/
|
|
21
|
+
hitsPerPage?: number;
|
|
8
22
|
};
|
package/model/snippetResult.ts
CHANGED
|
@@ -3,13 +3,7 @@
|
|
|
3
3
|
import type { HighlightResult } from './highlightResult';
|
|
4
4
|
|
|
5
5
|
export type UserHighlightResult = {
|
|
6
|
-
|
|
7
|
-
* Show highlighted section and words matched on a query.
|
|
8
|
-
*/
|
|
9
|
-
userID: Record<string, HighlightResult>;
|
|
6
|
+
userID: HighlightResult;
|
|
10
7
|
|
|
11
|
-
|
|
12
|
-
* Show highlighted section and words matched on a query.
|
|
13
|
-
*/
|
|
14
|
-
clusterName: Record<string, HighlightResult>;
|
|
8
|
+
clusterName: HighlightResult;
|
|
15
9
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@algolia/client-search",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.98",
|
|
4
4
|
"description": "JavaScript client for client-search",
|
|
5
5
|
"repository": "algolia/algoliasearch-client-javascript",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"clean": "rm -rf ./dist || true"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@algolia/client-common": "5.0.0-alpha.
|
|
43
|
-
"@algolia/requester-browser-xhr": "5.0.0-alpha.
|
|
44
|
-
"@algolia/requester-node-http": "5.0.0-alpha.
|
|
42
|
+
"@algolia/client-common": "5.0.0-alpha.99",
|
|
43
|
+
"@algolia/requester-browser-xhr": "5.0.0-alpha.99",
|
|
44
|
+
"@algolia/requester-node-http": "5.0.0-alpha.99"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@types/node": "20.
|
|
48
|
-
"rollup": "4.
|
|
49
|
-
"typescript": "5.
|
|
47
|
+
"@types/node": "20.11.5",
|
|
48
|
+
"rollup": "4.9.5",
|
|
49
|
+
"typescript": "5.3.3"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">= 14.0.0"
|