@algolia/client-query-suggestions 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 +44 -44
- package/dist/builds/browser.js +5 -5
- 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 +1 -1
- package/dist/builds/fetch.js +5 -5
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +5 -5
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +5 -5
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +5 -5
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +44 -44
- package/dist/node.d.cts +44 -44
- package/dist/node.d.ts +44 -44
- package/dist/src/querySuggestionsClient.cjs +5 -5
- package/dist/src/querySuggestionsClient.cjs.map +1 -1
- package/dist/src/querySuggestionsClient.js +5 -5
- package/dist/src/querySuggestionsClient.js.map +1 -1
- package/dist/worker.d.ts +44 -44
- package/package.json +7 -7
package/dist/worker.d.ts
CHANGED
|
@@ -5,41 +5,41 @@ type BaseResponse = {
|
|
|
5
5
|
/**
|
|
6
6
|
* HTTP status code.
|
|
7
7
|
*/
|
|
8
|
-
status?: number;
|
|
8
|
+
status?: number | undefined;
|
|
9
9
|
/**
|
|
10
10
|
* Details about the response, such as error messages.
|
|
11
11
|
*/
|
|
12
|
-
message?: string;
|
|
12
|
+
message?: string | undefined;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
type ConfigStatus = {
|
|
16
16
|
/**
|
|
17
17
|
* Name of the Query Suggestions index (case-sensitive).
|
|
18
18
|
*/
|
|
19
|
-
indexName?: string;
|
|
19
|
+
indexName?: string | undefined;
|
|
20
20
|
/**
|
|
21
21
|
* Whether the creation or update of the Query Suggestions index is in progress.
|
|
22
22
|
*/
|
|
23
|
-
isRunning?: boolean;
|
|
23
|
+
isRunning?: boolean | undefined;
|
|
24
24
|
/**
|
|
25
25
|
* Date and time when the Query Suggestions index was last built, in RFC 3339 format.
|
|
26
26
|
*/
|
|
27
|
-
lastBuiltAt?: string;
|
|
27
|
+
lastBuiltAt?: string | undefined;
|
|
28
28
|
/**
|
|
29
29
|
* Date and time when the Query Suggestions index was last updated successfully.
|
|
30
30
|
*/
|
|
31
|
-
lastSuccessfulBuiltAt?: string;
|
|
31
|
+
lastSuccessfulBuiltAt?: string | undefined;
|
|
32
32
|
/**
|
|
33
33
|
* Duration of the last successful build in seconds.
|
|
34
34
|
*/
|
|
35
|
-
lastSuccessfulBuildDuration?: string;
|
|
35
|
+
lastSuccessfulBuildDuration?: string | undefined;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
type AppID = {
|
|
39
39
|
/**
|
|
40
40
|
* Algolia application ID to which this Query Suggestions configuration belongs.
|
|
41
41
|
*/
|
|
42
|
-
appID?: string;
|
|
42
|
+
appID?: string | undefined;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -54,11 +54,11 @@ type Facet = {
|
|
|
54
54
|
/**
|
|
55
55
|
* Facet name.
|
|
56
56
|
*/
|
|
57
|
-
attribute?: string;
|
|
57
|
+
attribute?: string | undefined;
|
|
58
58
|
/**
|
|
59
59
|
* Number of suggestions.
|
|
60
60
|
*/
|
|
61
|
-
amount?: number;
|
|
61
|
+
amount?: number | undefined;
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
/**
|
|
@@ -72,19 +72,19 @@ type SourceIndex = {
|
|
|
72
72
|
/**
|
|
73
73
|
* If true, Query Suggestions uses all replica indices to find popular searches. If false, only the primary index is used.
|
|
74
74
|
*/
|
|
75
|
-
replicas?: boolean;
|
|
76
|
-
analyticsTags?: Array<string> | null;
|
|
77
|
-
facets?: Array<Facet> | null;
|
|
75
|
+
replicas?: boolean | undefined;
|
|
76
|
+
analyticsTags?: Array<string> | null | undefined;
|
|
77
|
+
facets?: Array<Facet> | null | undefined;
|
|
78
78
|
/**
|
|
79
79
|
* Minimum number of hits required to be included as a suggestion. A search query must at least generate `minHits` search results to be included in the Query Suggestions index.
|
|
80
80
|
*/
|
|
81
|
-
minHits?: number;
|
|
81
|
+
minHits?: number | undefined;
|
|
82
82
|
/**
|
|
83
83
|
* Minimum letters required to be included as a suggestion. A search query must be at least `minLetters` long to be included in the Query Suggestions index.
|
|
84
84
|
*/
|
|
85
|
-
minLetters?: number;
|
|
86
|
-
generate?: Array<Array<string>> | null;
|
|
87
|
-
external?: Array<string> | null;
|
|
85
|
+
minLetters?: number | undefined;
|
|
86
|
+
generate?: Array<Array<string>> | null | undefined;
|
|
87
|
+
external?: Array<string> | null | undefined;
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
/**
|
|
@@ -95,16 +95,16 @@ type Configuration = {
|
|
|
95
95
|
* Algolia indices from which to get the popular searches for query suggestions.
|
|
96
96
|
*/
|
|
97
97
|
sourceIndices: Array<SourceIndex>;
|
|
98
|
-
languages?: Languages;
|
|
99
|
-
exclude?: Array<string> | null;
|
|
98
|
+
languages?: Languages | undefined;
|
|
99
|
+
exclude?: Array<string> | null | undefined;
|
|
100
100
|
/**
|
|
101
101
|
* Whether to turn on personalized query suggestions.
|
|
102
102
|
*/
|
|
103
|
-
enablePersonalization?: boolean;
|
|
103
|
+
enablePersonalization?: boolean | undefined;
|
|
104
104
|
/**
|
|
105
105
|
* Whether to include suggestions with special characters.
|
|
106
106
|
*/
|
|
107
|
-
allowSpecialCharacters?: boolean;
|
|
107
|
+
allowSpecialCharacters?: boolean | undefined;
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
/**
|
|
@@ -126,16 +126,16 @@ type LogFile = {
|
|
|
126
126
|
/**
|
|
127
127
|
* Date and time of the log entry, in RFC 3339 format.
|
|
128
128
|
*/
|
|
129
|
-
timestamp?: string;
|
|
130
|
-
level?: LogLevel;
|
|
129
|
+
timestamp?: string | undefined;
|
|
130
|
+
level?: LogLevel | undefined;
|
|
131
131
|
/**
|
|
132
132
|
* Details about this log entry.
|
|
133
133
|
*/
|
|
134
|
-
message?: string;
|
|
134
|
+
message?: string | undefined;
|
|
135
135
|
/**
|
|
136
136
|
* Level indicating the position of a suggestion in a hierarchy of records. For example, a `contextLevel` of 1 indicates that this suggestion belongs to a previous suggestion with `contextLevel` 0.
|
|
137
137
|
*/
|
|
138
|
-
contextLevel?: number;
|
|
138
|
+
contextLevel?: number | undefined;
|
|
139
139
|
};
|
|
140
140
|
|
|
141
141
|
/**
|
|
@@ -143,7 +143,7 @@ type LogFile = {
|
|
|
143
143
|
*/
|
|
144
144
|
type CustomDeleteProps = {
|
|
145
145
|
/**
|
|
146
|
-
* Path of the endpoint,
|
|
146
|
+
* Path of the endpoint, for example `1/newFeature`.
|
|
147
147
|
*/
|
|
148
148
|
path: string;
|
|
149
149
|
/**
|
|
@@ -151,14 +151,14 @@ type CustomDeleteProps = {
|
|
|
151
151
|
*/
|
|
152
152
|
parameters?: {
|
|
153
153
|
[key: string]: any;
|
|
154
|
-
};
|
|
154
|
+
} | undefined;
|
|
155
155
|
};
|
|
156
156
|
/**
|
|
157
157
|
* Properties for the `customGet` method.
|
|
158
158
|
*/
|
|
159
159
|
type CustomGetProps = {
|
|
160
160
|
/**
|
|
161
|
-
* Path of the endpoint,
|
|
161
|
+
* Path of the endpoint, for example `1/newFeature`.
|
|
162
162
|
*/
|
|
163
163
|
path: string;
|
|
164
164
|
/**
|
|
@@ -166,14 +166,14 @@ type CustomGetProps = {
|
|
|
166
166
|
*/
|
|
167
167
|
parameters?: {
|
|
168
168
|
[key: string]: any;
|
|
169
|
-
};
|
|
169
|
+
} | undefined;
|
|
170
170
|
};
|
|
171
171
|
/**
|
|
172
172
|
* Properties for the `customPost` method.
|
|
173
173
|
*/
|
|
174
174
|
type CustomPostProps = {
|
|
175
175
|
/**
|
|
176
|
-
* Path of the endpoint,
|
|
176
|
+
* Path of the endpoint, for example `1/newFeature`.
|
|
177
177
|
*/
|
|
178
178
|
path: string;
|
|
179
179
|
/**
|
|
@@ -181,18 +181,18 @@ type CustomPostProps = {
|
|
|
181
181
|
*/
|
|
182
182
|
parameters?: {
|
|
183
183
|
[key: string]: any;
|
|
184
|
-
};
|
|
184
|
+
} | undefined;
|
|
185
185
|
/**
|
|
186
186
|
* Parameters to send with the custom request.
|
|
187
187
|
*/
|
|
188
|
-
body?: Record<string, unknown
|
|
188
|
+
body?: Record<string, unknown> | undefined;
|
|
189
189
|
};
|
|
190
190
|
/**
|
|
191
191
|
* Properties for the `customPut` method.
|
|
192
192
|
*/
|
|
193
193
|
type CustomPutProps = {
|
|
194
194
|
/**
|
|
195
|
-
* Path of the endpoint,
|
|
195
|
+
* Path of the endpoint, for example `1/newFeature`.
|
|
196
196
|
*/
|
|
197
197
|
path: string;
|
|
198
198
|
/**
|
|
@@ -200,11 +200,11 @@ type CustomPutProps = {
|
|
|
200
200
|
*/
|
|
201
201
|
parameters?: {
|
|
202
202
|
[key: string]: any;
|
|
203
|
-
};
|
|
203
|
+
} | undefined;
|
|
204
204
|
/**
|
|
205
205
|
* Parameters to send with the custom request.
|
|
206
206
|
*/
|
|
207
|
-
body?: Record<string, unknown
|
|
207
|
+
body?: Record<string, unknown> | undefined;
|
|
208
208
|
};
|
|
209
209
|
/**
|
|
210
210
|
* Properties for the `deleteConfig` method.
|
|
@@ -253,7 +253,7 @@ type UpdateConfigProps = {
|
|
|
253
253
|
configuration: Configuration;
|
|
254
254
|
};
|
|
255
255
|
|
|
256
|
-
declare const apiClientVersion = "5.
|
|
256
|
+
declare const apiClientVersion = "5.29.0";
|
|
257
257
|
declare const REGIONS: readonly ["eu", "us"];
|
|
258
258
|
type Region = (typeof REGIONS)[number];
|
|
259
259
|
type RegionOptions = {
|
|
@@ -283,7 +283,7 @@ declare function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiK
|
|
|
283
283
|
* @param segment - The algolia agent (user-agent) segment to add.
|
|
284
284
|
* @param version - The version of the agent.
|
|
285
285
|
*/
|
|
286
|
-
addAlgoliaAgent(segment: string, version?: string): void;
|
|
286
|
+
addAlgoliaAgent(segment: string, version?: string | undefined): void;
|
|
287
287
|
/**
|
|
288
288
|
* Helper method to switch the API key used to authenticate the requests.
|
|
289
289
|
*
|
|
@@ -305,7 +305,7 @@ declare function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiK
|
|
|
305
305
|
/**
|
|
306
306
|
* This method lets you send requests to the Algolia REST API.
|
|
307
307
|
* @param customDelete - The customDelete object.
|
|
308
|
-
* @param customDelete.path - Path of the endpoint,
|
|
308
|
+
* @param customDelete.path - Path of the endpoint, for example `1/newFeature`.
|
|
309
309
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
310
310
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
311
311
|
*/
|
|
@@ -313,7 +313,7 @@ declare function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiK
|
|
|
313
313
|
/**
|
|
314
314
|
* This method lets you send requests to the Algolia REST API.
|
|
315
315
|
* @param customGet - The customGet object.
|
|
316
|
-
* @param customGet.path - Path of the endpoint,
|
|
316
|
+
* @param customGet.path - Path of the endpoint, for example `1/newFeature`.
|
|
317
317
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
318
318
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
319
319
|
*/
|
|
@@ -321,7 +321,7 @@ declare function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiK
|
|
|
321
321
|
/**
|
|
322
322
|
* This method lets you send requests to the Algolia REST API.
|
|
323
323
|
* @param customPost - The customPost object.
|
|
324
|
-
* @param customPost.path - Path of the endpoint,
|
|
324
|
+
* @param customPost.path - Path of the endpoint, for example `1/newFeature`.
|
|
325
325
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
326
326
|
* @param customPost.body - Parameters to send with the custom request.
|
|
327
327
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -330,7 +330,7 @@ declare function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiK
|
|
|
330
330
|
/**
|
|
331
331
|
* This method lets you send requests to the Algolia REST API.
|
|
332
332
|
* @param customPut - The customPut object.
|
|
333
|
-
* @param customPut.path - Path of the endpoint,
|
|
333
|
+
* @param customPut.path - Path of the endpoint, for example `1/newFeature`.
|
|
334
334
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
335
335
|
* @param customPut.body - Parameters to send with the custom request.
|
|
336
336
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -353,7 +353,7 @@ declare function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiK
|
|
|
353
353
|
* - settings
|
|
354
354
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
355
355
|
*/
|
|
356
|
-
getAllConfigs(requestOptions?: RequestOptions): Promise<Array<ConfigurationResponse>>;
|
|
356
|
+
getAllConfigs(requestOptions?: RequestOptions | undefined): Promise<Array<ConfigurationResponse>>;
|
|
357
357
|
/**
|
|
358
358
|
* Retrieves a single Query Suggestions configuration by its index name.
|
|
359
359
|
*
|
|
@@ -401,11 +401,11 @@ declare function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiK
|
|
|
401
401
|
* Error.
|
|
402
402
|
*/
|
|
403
403
|
type ErrorBase = Record<string, any> & {
|
|
404
|
-
message?: string;
|
|
404
|
+
message?: string | undefined;
|
|
405
405
|
};
|
|
406
406
|
|
|
407
407
|
type QuerySuggestionsClient = ReturnType<typeof createQuerySuggestionsClient>;
|
|
408
408
|
|
|
409
|
-
declare function querySuggestionsClient(appId: string, apiKey: string, region: Region, options?: ClientOptions): QuerySuggestionsClient;
|
|
409
|
+
declare function querySuggestionsClient(appId: string, apiKey: string, region: Region, options?: ClientOptions | undefined): QuerySuggestionsClient;
|
|
410
410
|
|
|
411
411
|
export { type AppID, type BaseResponse, type ConfigStatus, type Configuration, type ConfigurationResponse, type ConfigurationWithIndex, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteConfigProps, type ErrorBase, type Facet, type GetConfigProps, type GetConfigStatusProps, type GetLogFileProps, type Languages, type LogFile, type LogLevel, type QuerySuggestionsClient, type Region, type RegionOptions, type SourceIndex, type UpdateConfigProps, apiClientVersion, querySuggestionsClient };
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "5.
|
|
2
|
+
"version": "5.29.0",
|
|
3
3
|
"repository": {
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git+https://github.com/algolia/algoliasearch-client-javascript.git"
|
|
@@ -49,14 +49,14 @@
|
|
|
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.29.0",
|
|
53
|
+
"@algolia/requester-browser-xhr": "5.29.0",
|
|
54
|
+
"@algolia/requester-fetch": "5.29.0",
|
|
55
|
+
"@algolia/requester-node-http": "5.29.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@arethetypeswrong/cli": "0.18.
|
|
59
|
-
"@types/node": "22.15.
|
|
58
|
+
"@arethetypeswrong/cli": "0.18.2",
|
|
59
|
+
"@types/node": "22.15.31",
|
|
60
60
|
"publint": "0.3.12",
|
|
61
61
|
"rollup": "4.41.0",
|
|
62
62
|
"tsup": "8.5.0",
|