@algolia/client-query-suggestions 5.0.0-alpha.99 → 5.0.0-beta.10
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/LICENSE +21 -0
- 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 +64 -51
- package/dist/client-query-suggestions.esm.browser.js +60 -59
- package/dist/client-query-suggestions.esm.node.js +64 -51
- 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/clientMethodProps.d.ts +2 -2
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/{querySuggestionsConfiguration.d.ts → configuration.d.ts} +4 -7
- package/dist/model/configuration.d.ts.map +1 -0
- package/dist/model/configurationResponse.d.ts +7 -0
- package/dist/model/configurationResponse.d.ts.map +1 -0
- package/dist/model/configurationWithIndex.d.ts +6 -0
- package/dist/model/configurationWithIndex.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 +4 -5
- 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/sourceIndex.d.ts +4 -13
- package/dist/model/sourceIndex.d.ts.map +1 -1
- package/dist/src/querySuggestionsClient.d.ts +37 -31
- package/dist/src/querySuggestionsClient.d.ts.map +1 -1
- package/model/{baseQuerySuggestionsConfigurationWithIndex.ts → appID.ts} +3 -3
- package/model/clientMethodProps.ts +2 -2
- package/model/{querySuggestionsConfiguration.ts → configuration.ts} +3 -6
- package/model/configurationResponse.ts +9 -0
- package/model/configurationWithIndex.ts +8 -0
- package/model/getConfigStatus200Response.ts +4 -4
- package/model/getLogFile200Response.ts +2 -2
- package/model/index.ts +4 -5
- package/model/languages.ts +1 -1
- package/model/logLevel.ts +1 -1
- package/model/sourceIndex.ts +4 -13
- package/package.json +11 -8
- 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/dist/model/querySuggestionsConfiguration.d.ts.map +0 -1
- package/dist/model/querySuggestionsConfigurationResponse.d.ts +0 -4
- package/dist/model/querySuggestionsConfigurationResponse.d.ts.map +0 -1
- package/dist/model/querySuggestionsConfigurationWithIndex.d.ts +0 -7
- package/dist/model/querySuggestionsConfigurationWithIndex.d.ts.map +0 -1
- package/model/baseQuerySuggestionsConfigurationResponse.ts +0 -23
- package/model/querySuggestionsConfigurationResponse.ts +0 -8
- package/model/querySuggestionsConfigurationWithIndex.ts +0 -10
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2013-Present Algolia
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
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): void;
|
|
15
|
+
createConfig(configurationWithIndex: import("../model").ConfigurationWithIndex, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BaseResponse>;
|
|
16
|
+
customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
|
|
17
|
+
customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
|
|
18
|
+
customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
|
|
19
|
+
customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
|
|
20
|
+
deleteConfig({ indexName }: import("../model").DeleteConfigProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BaseResponse>;
|
|
21
|
+
getAllConfigs(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").ConfigurationResponse[]>;
|
|
22
|
+
getConfig({ indexName }: import("../model").GetConfigProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").ConfigurationResponse>;
|
|
23
|
+
getConfigStatus({ indexName }: import("../model").GetConfigStatusProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetConfigStatus200Response>;
|
|
24
|
+
getLogFile({ indexName }: import("../model").GetLogFileProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetLogFile200Response>;
|
|
25
|
+
updateConfig({ indexName, configuration }: import("../model").UpdateConfigProps, requestOptions?: import("@algolia/client-common").RequestOptions): 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): void;
|
|
15
|
+
createConfig(configurationWithIndex: import("../model").ConfigurationWithIndex, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BaseResponse>;
|
|
16
|
+
customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
|
|
17
|
+
customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
|
|
18
|
+
customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
|
|
19
|
+
customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
|
|
20
|
+
deleteConfig({ indexName }: import("../model").DeleteConfigProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").BaseResponse>;
|
|
21
|
+
getAllConfigs(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").ConfigurationResponse[]>;
|
|
22
|
+
getConfig({ indexName }: import("../model").GetConfigProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").ConfigurationResponse>;
|
|
23
|
+
getConfigStatus({ indexName }: import("../model").GetConfigStatusProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetConfigStatus200Response>;
|
|
24
|
+
getLogFile({ indexName }: import("../model").GetLogFileProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetLogFile200Response>;
|
|
25
|
+
updateConfig({ indexName, configuration }: import("../model").UpdateConfigProps, requestOptions?: import("@algolia/client-common").RequestOptions): 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.10';
|
|
8
8
|
const REGIONS = ['eu', 'us'];
|
|
9
9
|
function getDefaultHosts(region) {
|
|
10
10
|
const url = 'query-suggestions.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -62,15 +62,17 @@ 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
66
|
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
67
|
+
* Required API Key ACLs:
|
|
68
|
+
* - editSettings.
|
|
69
|
+
*
|
|
70
|
+
* @param configurationWithIndex - The configurationWithIndex object.
|
|
69
71
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
70
72
|
*/
|
|
71
|
-
createConfig(
|
|
72
|
-
if (!
|
|
73
|
-
throw new Error('Parameter `
|
|
73
|
+
createConfig(configurationWithIndex, requestOptions) {
|
|
74
|
+
if (!configurationWithIndex) {
|
|
75
|
+
throw new Error('Parameter `configurationWithIndex` is required when calling `createConfig`.');
|
|
74
76
|
}
|
|
75
77
|
const requestPath = '/1/configs';
|
|
76
78
|
const headers = {};
|
|
@@ -80,14 +82,13 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
80
82
|
path: requestPath,
|
|
81
83
|
queryParameters,
|
|
82
84
|
headers,
|
|
83
|
-
data:
|
|
85
|
+
data: configurationWithIndex,
|
|
84
86
|
};
|
|
85
87
|
return transporter.request(request, requestOptions);
|
|
86
88
|
},
|
|
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,23 +303,25 @@ 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
|
-
* @param updateConfig.
|
|
313
|
+
* @param updateConfig.configuration - The configuration object.
|
|
304
314
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
305
315
|
*/
|
|
306
|
-
updateConfig({ indexName,
|
|
316
|
+
updateConfig({ indexName, configuration }, requestOptions) {
|
|
307
317
|
if (!indexName) {
|
|
308
318
|
throw new Error('Parameter `indexName` is required when calling `updateConfig`.');
|
|
309
319
|
}
|
|
310
|
-
if (!
|
|
311
|
-
throw new Error('Parameter `
|
|
320
|
+
if (!configuration) {
|
|
321
|
+
throw new Error('Parameter `configuration` is required when calling `updateConfig`.');
|
|
312
322
|
}
|
|
313
|
-
if (!
|
|
314
|
-
throw new Error('Parameter `
|
|
323
|
+
if (!configuration.sourceIndices) {
|
|
324
|
+
throw new Error('Parameter `configuration.sourceIndices` is required when calling `updateConfig`.');
|
|
315
325
|
}
|
|
316
326
|
const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));
|
|
317
327
|
const headers = {};
|
|
@@ -321,7 +331,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
321
331
|
path: requestPath,
|
|
322
332
|
queryParameters,
|
|
323
333
|
headers,
|
|
324
|
-
data:
|
|
334
|
+
data: configuration,
|
|
325
335
|
};
|
|
326
336
|
return transporter.request(request, requestOptions);
|
|
327
337
|
},
|
|
@@ -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;
|