@algolia/client-query-suggestions 5.0.0-alpha.98 → 5.0.0-beta.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/dist/builds/browser.d.ts +24 -3
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +24 -3
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-query-suggestions.cjs +52 -39
- package/dist/client-query-suggestions.esm.browser.js +39 -31
- package/dist/client-query-suggestions.esm.node.js +52 -39
- package/dist/client-query-suggestions.umd.js +2 -2
- package/dist/model/appID.d.ts +7 -0
- package/dist/model/appID.d.ts.map +1 -0
- package/dist/model/getConfigStatus200Response.d.ts +4 -4
- package/dist/model/getLogFile200Response.d.ts +2 -2
- package/dist/model/index.d.ts +1 -2
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/languages.d.ts +1 -1
- package/dist/model/logLevel.d.ts +1 -1
- package/dist/model/querySuggestionsConfiguration.d.ts +2 -5
- package/dist/model/querySuggestionsConfiguration.d.ts.map +1 -1
- package/dist/model/querySuggestionsConfigurationResponse.d.ts +5 -2
- package/dist/model/querySuggestionsConfigurationResponse.d.ts.map +1 -1
- package/dist/model/querySuggestionsConfigurationWithIndex.d.ts +1 -2
- package/dist/model/querySuggestionsConfigurationWithIndex.d.ts.map +1 -1
- package/dist/model/sourceIndex.d.ts +4 -13
- package/dist/model/sourceIndex.d.ts.map +1 -1
- package/dist/src/querySuggestionsClient.d.ts +29 -23
- package/dist/src/querySuggestionsClient.d.ts.map +1 -1
- package/model/{baseQuerySuggestionsConfigurationWithIndex.ts → appID.ts} +3 -3
- package/model/getConfigStatus200Response.ts +4 -4
- package/model/getLogFile200Response.ts +2 -2
- package/model/index.ts +1 -2
- package/model/languages.ts +1 -1
- package/model/logLevel.ts +1 -1
- package/model/querySuggestionsConfiguration.ts +2 -5
- package/model/querySuggestionsConfigurationResponse.ts +6 -4
- package/model/querySuggestionsConfigurationWithIndex.ts +1 -2
- package/model/sourceIndex.ts +4 -13
- package/package.json +7 -7
- package/dist/model/baseQuerySuggestionsConfigurationResponse.d.ts +0 -19
- package/dist/model/baseQuerySuggestionsConfigurationResponse.d.ts.map +0 -1
- package/dist/model/baseQuerySuggestionsConfigurationWithIndex.d.ts +0 -7
- package/dist/model/baseQuerySuggestionsConfigurationWithIndex.d.ts.map +0 -1
- package/model/baseQuerySuggestionsConfigurationResponse.ts +0 -23
package/dist/builds/browser.d.ts
CHANGED
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
import type { ClientOptions } from '@algolia/client-common';
|
|
2
|
-
import type {
|
|
3
|
-
export { apiClientVersion,
|
|
2
|
+
import type { Region } from '../src/querySuggestionsClient';
|
|
3
|
+
export { apiClientVersion, Region } from '../src/querySuggestionsClient';
|
|
4
4
|
export * from '../model';
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The client type.
|
|
7
|
+
*/
|
|
8
|
+
export type QuerySuggestionsClient = ReturnType<typeof querySuggestionsClient>;
|
|
9
|
+
export declare function querySuggestionsClient(appId: string, apiKey: string, region: Region, options?: ClientOptions): {
|
|
10
|
+
transporter: import("@algolia/client-common").Transporter;
|
|
11
|
+
appId: string;
|
|
12
|
+
clearCache(): Promise<void>;
|
|
13
|
+
readonly _ua: string;
|
|
14
|
+
addAlgoliaAgent(segment: string, version?: string | undefined): void;
|
|
15
|
+
createConfig(querySuggestionsConfigurationWithIndex: import("../model").QuerySuggestionsConfigurationWithIndex, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").BaseResponse>;
|
|
16
|
+
customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
17
|
+
customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
18
|
+
customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
19
|
+
customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
20
|
+
deleteConfig({ indexName }: import("../model").DeleteConfigProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").BaseResponse>;
|
|
21
|
+
getAllConfigs(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").QuerySuggestionsConfigurationResponse[]>;
|
|
22
|
+
getConfig({ indexName }: import("../model").GetConfigProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").QuerySuggestionsConfigurationResponse>;
|
|
23
|
+
getConfigStatus({ indexName }: import("../model").GetConfigStatusProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetConfigStatus200Response>;
|
|
24
|
+
getLogFile({ indexName }: import("../model").GetLogFileProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetLogFile200Response>;
|
|
25
|
+
updateConfig({ indexName, querySuggestionsConfiguration }: import("../model").UpdateConfigProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").BaseResponse>;
|
|
26
|
+
};
|
|
6
27
|
//# sourceMappingURL=browser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../builds/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAW5D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../builds/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAW5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAO5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACzE,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAG/E,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa;;;;;;;;;;;;;;;;;EAyCxB"}
|
package/dist/builds/node.d.ts
CHANGED
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
import type { ClientOptions } from '@algolia/client-common';
|
|
2
|
-
import type {
|
|
3
|
-
export { apiClientVersion,
|
|
2
|
+
import type { Region } from '../src/querySuggestionsClient';
|
|
3
|
+
export { apiClientVersion, Region } from '../src/querySuggestionsClient';
|
|
4
4
|
export * from '../model';
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The client type.
|
|
7
|
+
*/
|
|
8
|
+
export type QuerySuggestionsClient = ReturnType<typeof querySuggestionsClient>;
|
|
9
|
+
export declare function querySuggestionsClient(appId: string, apiKey: string, region: Region, options?: ClientOptions): {
|
|
10
|
+
transporter: import("@algolia/client-common").Transporter;
|
|
11
|
+
appId: string;
|
|
12
|
+
clearCache(): Promise<void>;
|
|
13
|
+
_ua: string;
|
|
14
|
+
addAlgoliaAgent(segment: string, version?: string | undefined): void;
|
|
15
|
+
createConfig(querySuggestionsConfigurationWithIndex: import("../model").QuerySuggestionsConfigurationWithIndex, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").BaseResponse>;
|
|
16
|
+
customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
17
|
+
customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
18
|
+
customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
19
|
+
customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
20
|
+
deleteConfig({ indexName }: import("../model").DeleteConfigProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").BaseResponse>;
|
|
21
|
+
getAllConfigs(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").QuerySuggestionsConfigurationResponse[]>;
|
|
22
|
+
getConfig({ indexName }: import("../model").GetConfigProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").QuerySuggestionsConfigurationResponse>;
|
|
23
|
+
getConfigStatus({ indexName }: import("../model").GetConfigStatusProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetConfigStatus200Response>;
|
|
24
|
+
getLogFile({ indexName }: import("../model").GetLogFileProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetLogFile200Response>;
|
|
25
|
+
updateConfig({ indexName, querySuggestionsConfiguration }: import("../model").UpdateConfigProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").BaseResponse>;
|
|
26
|
+
};
|
|
6
27
|
//# sourceMappingURL=node.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../builds/node.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAU5D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../builds/node.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAU5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAM5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACzE,cAAc,UAAU,CAAC;AAEzB;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAG/E,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa;;;;;;;;;;;;;;;;;EAqCxB"}
|
|
@@ -4,7 +4,7 @@ var clientCommon = require('@algolia/client-common');
|
|
|
4
4
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
5
5
|
|
|
6
6
|
// 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.
|
|
7
|
-
const apiClientVersion = '5.0.0-
|
|
7
|
+
const apiClientVersion = '5.0.0-beta.1';
|
|
8
8
|
const REGIONS = ['eu', 'us'];
|
|
9
9
|
function getDefaultHosts(region) {
|
|
10
10
|
const url = 'query-suggestions.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -62,9 +62,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
62
62
|
transporter.algoliaAgent.add({ segment, version });
|
|
63
63
|
},
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* Creates a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
|
|
66
|
+
*
|
|
67
|
+
* Required API Key ACLs:
|
|
68
|
+
* - editSettings.
|
|
66
69
|
*
|
|
67
|
-
* @summary Create a configuration.
|
|
68
70
|
* @param querySuggestionsConfigurationWithIndex - The querySuggestionsConfigurationWithIndex object.
|
|
69
71
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
70
72
|
*/
|
|
@@ -87,7 +89,6 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
87
89
|
/**
|
|
88
90
|
* This method allow you to send requests to the Algolia REST API.
|
|
89
91
|
*
|
|
90
|
-
* @summary Send requests to the Algolia REST API.
|
|
91
92
|
* @param customDelete - The customDelete object.
|
|
92
93
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
93
94
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -97,7 +98,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
97
98
|
if (!path) {
|
|
98
99
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
99
100
|
}
|
|
100
|
-
const requestPath = '/
|
|
101
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
101
102
|
const headers = {};
|
|
102
103
|
const queryParameters = parameters ? parameters : {};
|
|
103
104
|
const request = {
|
|
@@ -111,7 +112,6 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
111
112
|
/**
|
|
112
113
|
* This method allow you to send requests to the Algolia REST API.
|
|
113
114
|
*
|
|
114
|
-
* @summary Send requests to the Algolia REST API.
|
|
115
115
|
* @param customGet - The customGet object.
|
|
116
116
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
117
117
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -121,7 +121,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
121
121
|
if (!path) {
|
|
122
122
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
123
123
|
}
|
|
124
|
-
const requestPath = '/
|
|
124
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
125
125
|
const headers = {};
|
|
126
126
|
const queryParameters = parameters ? parameters : {};
|
|
127
127
|
const request = {
|
|
@@ -135,7 +135,6 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
135
135
|
/**
|
|
136
136
|
* This method allow you to send requests to the Algolia REST API.
|
|
137
137
|
*
|
|
138
|
-
* @summary Send requests to the Algolia REST API.
|
|
139
138
|
* @param customPost - The customPost object.
|
|
140
139
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
141
140
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -146,7 +145,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
146
145
|
if (!path) {
|
|
147
146
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
148
147
|
}
|
|
149
|
-
const requestPath = '/
|
|
148
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
150
149
|
const headers = {};
|
|
151
150
|
const queryParameters = parameters ? parameters : {};
|
|
152
151
|
const request = {
|
|
@@ -161,7 +160,6 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
161
160
|
/**
|
|
162
161
|
* This method allow you to send requests to the Algolia REST API.
|
|
163
162
|
*
|
|
164
|
-
* @summary Send requests to the Algolia REST API.
|
|
165
163
|
* @param customPut - The customPut object.
|
|
166
164
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
167
165
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -172,7 +170,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
172
170
|
if (!path) {
|
|
173
171
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
174
172
|
}
|
|
175
|
-
const requestPath = '/
|
|
173
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
176
174
|
const headers = {};
|
|
177
175
|
const queryParameters = parameters ? parameters : {};
|
|
178
176
|
const request = {
|
|
@@ -185,9 +183,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
185
183
|
return transporter.request(request, requestOptions);
|
|
186
184
|
},
|
|
187
185
|
/**
|
|
188
|
-
*
|
|
186
|
+
* Deletes a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. To delete the Query Suggestions index itself, use the Search API and the [Delete an index](/specs/search#tag/Indices/operation/deleteIndex) operation.
|
|
187
|
+
*
|
|
188
|
+
* Required API Key ACLs:
|
|
189
|
+
* - editSettings.
|
|
189
190
|
*
|
|
190
|
-
* @summary Delete a configuration.
|
|
191
191
|
* @param deleteConfig - The deleteConfig object.
|
|
192
192
|
* @param deleteConfig.indexName - Query Suggestions index name.
|
|
193
193
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -208,9 +208,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
208
208
|
return transporter.request(request, requestOptions);
|
|
209
209
|
},
|
|
210
210
|
/**
|
|
211
|
-
*
|
|
211
|
+
* Retrieves all Query Suggestions configurations of your Algolia application.
|
|
212
|
+
*
|
|
213
|
+
* Required API Key ACLs:
|
|
214
|
+
* - settings.
|
|
212
215
|
*
|
|
213
|
-
* @summary List configurations.
|
|
214
216
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
215
217
|
*/
|
|
216
218
|
getAllConfigs(requestOptions) {
|
|
@@ -226,9 +228,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
226
228
|
return transporter.request(request, requestOptions);
|
|
227
229
|
},
|
|
228
230
|
/**
|
|
229
|
-
*
|
|
231
|
+
* Retrieves a single Query Suggestions configuration by its index name.
|
|
232
|
+
*
|
|
233
|
+
* Required API Key ACLs:
|
|
234
|
+
* - settings.
|
|
230
235
|
*
|
|
231
|
-
* @summary Get a configuration.
|
|
232
236
|
* @param getConfig - The getConfig object.
|
|
233
237
|
* @param getConfig.indexName - Query Suggestions index name.
|
|
234
238
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -249,9 +253,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
249
253
|
return transporter.request(request, requestOptions);
|
|
250
254
|
},
|
|
251
255
|
/**
|
|
252
|
-
*
|
|
256
|
+
* Reports the status of a Query Suggestions index.
|
|
257
|
+
*
|
|
258
|
+
* Required API Key ACLs:
|
|
259
|
+
* - settings.
|
|
253
260
|
*
|
|
254
|
-
* @summary Get configuration status.
|
|
255
261
|
* @param getConfigStatus - The getConfigStatus object.
|
|
256
262
|
* @param getConfigStatus.indexName - Query Suggestions index name.
|
|
257
263
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -272,9 +278,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
272
278
|
return transporter.request(request, requestOptions);
|
|
273
279
|
},
|
|
274
280
|
/**
|
|
275
|
-
*
|
|
281
|
+
* Retrieves the logs for a single Query Suggestions index.
|
|
282
|
+
*
|
|
283
|
+
* Required API Key ACLs:
|
|
284
|
+
* - settings.
|
|
276
285
|
*
|
|
277
|
-
* @summary Get logs.
|
|
278
286
|
* @param getLogFile - The getLogFile object.
|
|
279
287
|
* @param getLogFile.indexName - Query Suggestions index name.
|
|
280
288
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -295,9 +303,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
295
303
|
return transporter.request(request, requestOptions);
|
|
296
304
|
},
|
|
297
305
|
/**
|
|
298
|
-
*
|
|
306
|
+
* Updates a QuerySuggestions configuration.
|
|
307
|
+
*
|
|
308
|
+
* Required API Key ACLs:
|
|
309
|
+
* - editSettings.
|
|
299
310
|
*
|
|
300
|
-
* @summary Update a configuration.
|
|
301
311
|
* @param updateConfig - The updateConfig object.
|
|
302
312
|
* @param updateConfig.indexName - Query Suggestions index name.
|
|
303
313
|
* @param updateConfig.querySuggestionsConfiguration - The querySuggestionsConfiguration object.
|
|
@@ -329,6 +339,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
329
339
|
}
|
|
330
340
|
|
|
331
341
|
// 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.
|
|
342
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
332
343
|
function querySuggestionsClient(appId, apiKey, region, options) {
|
|
333
344
|
if (!appId || typeof appId !== 'string') {
|
|
334
345
|
throw new Error('`appId` is missing.');
|
|
@@ -340,22 +351,24 @@ function querySuggestionsClient(appId, apiKey, region, options) {
|
|
|
340
351
|
(region && (typeof region !== 'string' || !REGIONS.includes(region)))) {
|
|
341
352
|
throw new Error(`\`region\` is required and must be one of the following: ${REGIONS.join(', ')}`);
|
|
342
353
|
}
|
|
343
|
-
return
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
354
|
+
return {
|
|
355
|
+
...createQuerySuggestionsClient({
|
|
356
|
+
appId,
|
|
357
|
+
apiKey,
|
|
358
|
+
region,
|
|
359
|
+
timeouts: {
|
|
360
|
+
connect: clientCommon.DEFAULT_CONNECT_TIMEOUT_NODE,
|
|
361
|
+
read: clientCommon.DEFAULT_READ_TIMEOUT_NODE,
|
|
362
|
+
write: clientCommon.DEFAULT_WRITE_TIMEOUT_NODE,
|
|
363
|
+
},
|
|
364
|
+
requester: requesterNodeHttp.createHttpRequester(),
|
|
365
|
+
algoliaAgents: [{ segment: 'Node.js', version: process.versions.node }],
|
|
366
|
+
responsesCache: clientCommon.createNullCache(),
|
|
367
|
+
requestsCache: clientCommon.createNullCache(),
|
|
368
|
+
hostsCache: clientCommon.createMemoryCache(),
|
|
369
|
+
...options,
|
|
370
|
+
}),
|
|
371
|
+
};
|
|
359
372
|
}
|
|
360
373
|
|
|
361
374
|
exports.apiClientVersion = apiClientVersion;
|
|
@@ -207,7 +207,7 @@ function _toPrimitive(t, r) {
|
|
|
207
207
|
}
|
|
208
208
|
function _toPropertyKey(t) {
|
|
209
209
|
var i = _toPrimitive(t, "string");
|
|
210
|
-
return "symbol" == typeof i ? i :
|
|
210
|
+
return "symbol" == typeof i ? i : i + "";
|
|
211
211
|
}
|
|
212
212
|
function _defineProperty(obj, key, value) {
|
|
213
213
|
key = _toPropertyKey(key);
|
|
@@ -270,7 +270,7 @@ class DetailedApiError extends ApiError {
|
|
|
270
270
|
}
|
|
271
271
|
function serializeUrl(host, path, queryParameters) {
|
|
272
272
|
const queryParametersAsString = serializeQueryParameters(queryParameters);
|
|
273
|
-
let url = `${host.protocol}://${host.url}/${path.charAt(0) === '/' ? path.
|
|
273
|
+
let url = `${host.protocol}://${host.url}${host.port ? `:${host.port}` : ''}/${path.charAt(0) === '/' ? path.substring(1) : path}`;
|
|
274
274
|
if (queryParametersAsString.length) {
|
|
275
275
|
url += `?${queryParametersAsString}`;
|
|
276
276
|
}
|
|
@@ -278,7 +278,7 @@ function serializeUrl(host, path, queryParameters) {
|
|
|
278
278
|
}
|
|
279
279
|
function serializeQueryParameters(parameters) {
|
|
280
280
|
const isObjectOrArray = value => Object.prototype.toString.call(value) === '[object Object]' || Object.prototype.toString.call(value) === '[object Array]';
|
|
281
|
-
return Object.keys(parameters).map(key => `${key}=${encodeURIComponent(isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key])}`).join('&');
|
|
281
|
+
return Object.keys(parameters).map(key => `${key}=${encodeURIComponent(isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key]).replaceAll('+', '%20')}`).join('&');
|
|
282
282
|
}
|
|
283
283
|
function serializeData(request, requestOptions) {
|
|
284
284
|
if (request.method === 'GET' || request.data === undefined && requestOptions.data === undefined) {
|
|
@@ -449,16 +449,13 @@ function createTransporter({
|
|
|
449
449
|
if (host === undefined) {
|
|
450
450
|
throw new RetryError(stackTraceWithoutCredentials(stackTrace));
|
|
451
451
|
}
|
|
452
|
-
let responseTimeout = requestOptions.
|
|
453
|
-
if (responseTimeout === undefined) {
|
|
454
|
-
responseTimeout = isRead ? timeouts.read : timeouts.write;
|
|
455
|
-
}
|
|
452
|
+
let responseTimeout = isRead ? requestOptions.timeouts?.read || timeouts.read : requestOptions.timeouts?.write || timeouts.write;
|
|
456
453
|
const payload = {
|
|
457
454
|
data,
|
|
458
455
|
headers,
|
|
459
456
|
method: request.method,
|
|
460
457
|
url: serializeUrl(host, request.path, queryParameters),
|
|
461
|
-
connectTimeout: getTimeout(timeoutsCount, timeouts.connect),
|
|
458
|
+
connectTimeout: getTimeout(timeoutsCount, requestOptions.timeouts?.connect || timeouts.connect),
|
|
462
459
|
responseTimeout: getTimeout(timeoutsCount, responseTimeout)
|
|
463
460
|
};
|
|
464
461
|
/**
|
|
@@ -686,7 +683,7 @@ function createXhrRequester() {
|
|
|
686
683
|
}
|
|
687
684
|
|
|
688
685
|
// 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.
|
|
689
|
-
const apiClientVersion = '5.0.0-
|
|
686
|
+
const apiClientVersion = '5.0.0-beta.1';
|
|
690
687
|
const REGIONS = ['eu', 'us'];
|
|
691
688
|
function getDefaultHosts(region) {
|
|
692
689
|
const url = 'query-suggestions.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -744,9 +741,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
744
741
|
transporter.algoliaAgent.add({ segment, version });
|
|
745
742
|
},
|
|
746
743
|
/**
|
|
747
|
-
*
|
|
744
|
+
* Creates a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
|
|
745
|
+
*
|
|
746
|
+
* Required API Key ACLs:
|
|
747
|
+
* - editSettings.
|
|
748
748
|
*
|
|
749
|
-
* @summary Create a configuration.
|
|
750
749
|
* @param querySuggestionsConfigurationWithIndex - The querySuggestionsConfigurationWithIndex object.
|
|
751
750
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
752
751
|
*/
|
|
@@ -769,7 +768,6 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
769
768
|
/**
|
|
770
769
|
* This method allow you to send requests to the Algolia REST API.
|
|
771
770
|
*
|
|
772
|
-
* @summary Send requests to the Algolia REST API.
|
|
773
771
|
* @param customDelete - The customDelete object.
|
|
774
772
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
775
773
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -779,7 +777,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
779
777
|
if (!path) {
|
|
780
778
|
throw new Error('Parameter `path` is required when calling `customDelete`.');
|
|
781
779
|
}
|
|
782
|
-
const requestPath = '/
|
|
780
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
783
781
|
const headers = {};
|
|
784
782
|
const queryParameters = parameters ? parameters : {};
|
|
785
783
|
const request = {
|
|
@@ -793,7 +791,6 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
793
791
|
/**
|
|
794
792
|
* This method allow you to send requests to the Algolia REST API.
|
|
795
793
|
*
|
|
796
|
-
* @summary Send requests to the Algolia REST API.
|
|
797
794
|
* @param customGet - The customGet object.
|
|
798
795
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
799
796
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -803,7 +800,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
803
800
|
if (!path) {
|
|
804
801
|
throw new Error('Parameter `path` is required when calling `customGet`.');
|
|
805
802
|
}
|
|
806
|
-
const requestPath = '/
|
|
803
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
807
804
|
const headers = {};
|
|
808
805
|
const queryParameters = parameters ? parameters : {};
|
|
809
806
|
const request = {
|
|
@@ -817,7 +814,6 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
817
814
|
/**
|
|
818
815
|
* This method allow you to send requests to the Algolia REST API.
|
|
819
816
|
*
|
|
820
|
-
* @summary Send requests to the Algolia REST API.
|
|
821
817
|
* @param customPost - The customPost object.
|
|
822
818
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
823
819
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -828,7 +824,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
828
824
|
if (!path) {
|
|
829
825
|
throw new Error('Parameter `path` is required when calling `customPost`.');
|
|
830
826
|
}
|
|
831
|
-
const requestPath = '/
|
|
827
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
832
828
|
const headers = {};
|
|
833
829
|
const queryParameters = parameters ? parameters : {};
|
|
834
830
|
const request = {
|
|
@@ -843,7 +839,6 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
843
839
|
/**
|
|
844
840
|
* This method allow you to send requests to the Algolia REST API.
|
|
845
841
|
*
|
|
846
|
-
* @summary Send requests to the Algolia REST API.
|
|
847
842
|
* @param customPut - The customPut object.
|
|
848
843
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
849
844
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -854,7 +849,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
854
849
|
if (!path) {
|
|
855
850
|
throw new Error('Parameter `path` is required when calling `customPut`.');
|
|
856
851
|
}
|
|
857
|
-
const requestPath = '/
|
|
852
|
+
const requestPath = '/{path}'.replace('{path}', path);
|
|
858
853
|
const headers = {};
|
|
859
854
|
const queryParameters = parameters ? parameters : {};
|
|
860
855
|
const request = {
|
|
@@ -867,9 +862,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
867
862
|
return transporter.request(request, requestOptions);
|
|
868
863
|
},
|
|
869
864
|
/**
|
|
870
|
-
*
|
|
865
|
+
* Deletes a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. To delete the Query Suggestions index itself, use the Search API and the [Delete an index](/specs/search#tag/Indices/operation/deleteIndex) operation.
|
|
866
|
+
*
|
|
867
|
+
* Required API Key ACLs:
|
|
868
|
+
* - editSettings.
|
|
871
869
|
*
|
|
872
|
-
* @summary Delete a configuration.
|
|
873
870
|
* @param deleteConfig - The deleteConfig object.
|
|
874
871
|
* @param deleteConfig.indexName - Query Suggestions index name.
|
|
875
872
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -890,9 +887,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
890
887
|
return transporter.request(request, requestOptions);
|
|
891
888
|
},
|
|
892
889
|
/**
|
|
893
|
-
*
|
|
890
|
+
* Retrieves all Query Suggestions configurations of your Algolia application.
|
|
891
|
+
*
|
|
892
|
+
* Required API Key ACLs:
|
|
893
|
+
* - settings.
|
|
894
894
|
*
|
|
895
|
-
* @summary List configurations.
|
|
896
895
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
897
896
|
*/
|
|
898
897
|
getAllConfigs(requestOptions) {
|
|
@@ -908,9 +907,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
908
907
|
return transporter.request(request, requestOptions);
|
|
909
908
|
},
|
|
910
909
|
/**
|
|
911
|
-
*
|
|
910
|
+
* Retrieves a single Query Suggestions configuration by its index name.
|
|
911
|
+
*
|
|
912
|
+
* Required API Key ACLs:
|
|
913
|
+
* - settings.
|
|
912
914
|
*
|
|
913
|
-
* @summary Get a configuration.
|
|
914
915
|
* @param getConfig - The getConfig object.
|
|
915
916
|
* @param getConfig.indexName - Query Suggestions index name.
|
|
916
917
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -931,9 +932,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
931
932
|
return transporter.request(request, requestOptions);
|
|
932
933
|
},
|
|
933
934
|
/**
|
|
934
|
-
*
|
|
935
|
+
* Reports the status of a Query Suggestions index.
|
|
936
|
+
*
|
|
937
|
+
* Required API Key ACLs:
|
|
938
|
+
* - settings.
|
|
935
939
|
*
|
|
936
|
-
* @summary Get configuration status.
|
|
937
940
|
* @param getConfigStatus - The getConfigStatus object.
|
|
938
941
|
* @param getConfigStatus.indexName - Query Suggestions index name.
|
|
939
942
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -954,9 +957,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
954
957
|
return transporter.request(request, requestOptions);
|
|
955
958
|
},
|
|
956
959
|
/**
|
|
957
|
-
*
|
|
960
|
+
* Retrieves the logs for a single Query Suggestions index.
|
|
961
|
+
*
|
|
962
|
+
* Required API Key ACLs:
|
|
963
|
+
* - settings.
|
|
958
964
|
*
|
|
959
|
-
* @summary Get logs.
|
|
960
965
|
* @param getLogFile - The getLogFile object.
|
|
961
966
|
* @param getLogFile.indexName - Query Suggestions index name.
|
|
962
967
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -977,9 +982,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
977
982
|
return transporter.request(request, requestOptions);
|
|
978
983
|
},
|
|
979
984
|
/**
|
|
980
|
-
*
|
|
985
|
+
* Updates a QuerySuggestions configuration.
|
|
986
|
+
*
|
|
987
|
+
* Required API Key ACLs:
|
|
988
|
+
* - editSettings.
|
|
981
989
|
*
|
|
982
|
-
* @summary Update a configuration.
|
|
983
990
|
* @param updateConfig - The updateConfig object.
|
|
984
991
|
* @param updateConfig.indexName - Query Suggestions index name.
|
|
985
992
|
* @param updateConfig.querySuggestionsConfiguration - The querySuggestionsConfiguration object.
|
|
@@ -1011,6 +1018,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
1011
1018
|
}
|
|
1012
1019
|
|
|
1013
1020
|
// 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.
|
|
1021
|
+
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
|
|
1014
1022
|
function querySuggestionsClient(appId, apiKey, region, options) {
|
|
1015
1023
|
if (!appId || typeof appId !== 'string') {
|
|
1016
1024
|
throw new Error('`appId` is missing.');
|