@algolia/client-query-suggestions 5.0.0-alpha.73 → 5.0.0-alpha.76
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-query-suggestions.cjs.js +37 -39
- package/dist/client-query-suggestions.esm.browser.js +37 -37
- package/dist/client-query-suggestions.esm.node.js +37 -37
- package/dist/client-query-suggestions.umd.js +2 -2
- package/dist/model/baseResponse.d.ts +11 -0
- package/dist/model/baseResponse.d.ts.map +1 -0
- package/dist/model/clientMethodProps.d.ts +17 -17
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/facet.d.ts +14 -0
- package/dist/model/facet.d.ts.map +1 -0
- package/dist/model/getConfigStatus200Response.d.ts +23 -0
- package/dist/model/getConfigStatus200Response.d.ts.map +1 -0
- package/dist/model/getLogFile200Response.d.ts +17 -0
- package/dist/model/getLogFile200Response.d.ts.map +1 -0
- package/dist/model/index.d.ts +10 -9
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/languages.d.ts +5 -0
- package/dist/model/languages.d.ts.map +1 -0
- package/dist/model/logLevel.d.ts +1 -1
- package/dist/model/querySuggestionsConfiguration.d.ts +25 -0
- package/dist/model/querySuggestionsConfiguration.d.ts.map +1 -0
- package/dist/model/querySuggestionsConfigurationResponse.d.ts +4 -0
- package/dist/model/querySuggestionsConfigurationResponse.d.ts.map +1 -0
- package/dist/model/querySuggestionsConfigurationResponseAllOf.d.ts +19 -0
- package/dist/model/querySuggestionsConfigurationResponseAllOf.d.ts.map +1 -0
- package/dist/model/querySuggestionsConfigurationWithIndex.d.ts +7 -0
- package/dist/model/querySuggestionsConfigurationWithIndex.d.ts.map +1 -0
- package/dist/model/querySuggestionsConfigurationWithIndexAllOf.d.ts +7 -0
- package/dist/model/querySuggestionsConfigurationWithIndexAllOf.d.ts.map +1 -0
- package/dist/model/sourceIndex.d.ts +17 -13
- package/dist/model/sourceIndex.d.ts.map +1 -1
- package/dist/src/querySuggestionsClient.d.ts +39 -39
- package/dist/src/querySuggestionsClient.d.ts.map +1 -1
- package/model/{sourceIndexExternal.ts → baseResponse.ts} +5 -5
- package/model/clientMethodProps.ts +17 -17
- package/model/{successResponse.ts → facet.ts} +8 -5
- package/model/getConfigStatus200Response.ts +28 -0
- package/model/getLogFile200Response.ts +22 -0
- package/model/index.ts +10 -9
- package/model/languages.ts +6 -0
- package/model/logLevel.ts +1 -1
- package/model/querySuggestionsConfiguration.ts +31 -0
- package/model/querySuggestionsConfigurationResponse.ts +8 -0
- package/model/querySuggestionsConfigurationResponseAllOf.ts +23 -0
- package/model/querySuggestionsConfigurationWithIndex.ts +10 -0
- package/model/{indexName.ts → querySuggestionsConfigurationWithIndexAllOf.ts} +2 -2
- package/model/sourceIndex.ts +18 -13
- package/package.json +8 -7
- package/dist/model/indexName.d.ts +0 -7
- package/dist/model/indexName.d.ts.map +0 -1
- package/dist/model/logFile.d.ts +0 -17
- package/dist/model/logFile.d.ts.map +0 -1
- package/dist/model/querySuggestionsIndex.d.ts +0 -20
- package/dist/model/querySuggestionsIndex.d.ts.map +0 -1
- package/dist/model/querySuggestionsIndexParam.d.ts +0 -16
- package/dist/model/querySuggestionsIndexParam.d.ts.map +0 -1
- package/dist/model/querySuggestionsIndexWithIndexParam.d.ts +0 -4
- package/dist/model/querySuggestionsIndexWithIndexParam.d.ts.map +0 -1
- package/dist/model/sourceIndexExternal.d.ts +0 -11
- package/dist/model/sourceIndexExternal.d.ts.map +0 -1
- package/dist/model/sourceIndexWithReplicas.d.ts +0 -39
- package/dist/model/sourceIndexWithReplicas.d.ts.map +0 -1
- package/dist/model/status.d.ts +0 -15
- package/dist/model/status.d.ts.map +0 -1
- package/dist/model/successResponse.d.ts +0 -11
- package/dist/model/successResponse.d.ts.map +0 -1
- package/model/logFile.ts +0 -22
- package/model/querySuggestionsIndex.ts +0 -25
- package/model/querySuggestionsIndexParam.ts +0 -20
- package/model/querySuggestionsIndexWithIndexParam.ts +0 -7
- package/model/sourceIndexWithReplicas.ts +0 -48
- package/model/status.ts +0 -18
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var clientCommon = require('@algolia/client-common');
|
|
6
4
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
7
5
|
|
|
8
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.
|
|
9
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
7
|
+
const apiClientVersion = '5.0.0-alpha.76';
|
|
10
8
|
const REGIONS = ['eu', 'us'];
|
|
11
9
|
function getDefaultHosts(region) {
|
|
12
10
|
const url = 'query-suggestions.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -64,15 +62,15 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
64
62
|
transporter.algoliaAgent.add({ segment, version });
|
|
65
63
|
},
|
|
66
64
|
/**
|
|
67
|
-
* Create a
|
|
65
|
+
* Create a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
|
|
68
66
|
*
|
|
69
67
|
* @summary Create a configuration.
|
|
70
|
-
* @param
|
|
68
|
+
* @param querySuggestionsConfigurationWithIndex - The querySuggestionsConfigurationWithIndex object.
|
|
71
69
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
72
70
|
*/
|
|
73
|
-
createConfig(
|
|
74
|
-
if (!
|
|
75
|
-
throw new Error('Parameter `
|
|
71
|
+
createConfig(querySuggestionsConfigurationWithIndex, requestOptions) {
|
|
72
|
+
if (!querySuggestionsConfigurationWithIndex) {
|
|
73
|
+
throw new Error('Parameter `querySuggestionsConfigurationWithIndex` is required when calling `createConfig`.');
|
|
76
74
|
}
|
|
77
75
|
const requestPath = '/1/configs';
|
|
78
76
|
const headers = {};
|
|
@@ -82,7 +80,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
82
80
|
path: requestPath,
|
|
83
81
|
queryParameters,
|
|
84
82
|
headers,
|
|
85
|
-
data:
|
|
83
|
+
data: querySuggestionsConfigurationWithIndex,
|
|
86
84
|
};
|
|
87
85
|
return transporter.request(request, requestOptions);
|
|
88
86
|
},
|
|
@@ -91,8 +89,8 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
91
89
|
*
|
|
92
90
|
* @summary Send requests to the Algolia REST API.
|
|
93
91
|
* @param del - The del object.
|
|
94
|
-
* @param del.path -
|
|
95
|
-
* @param del.parameters - Query parameters to
|
|
92
|
+
* @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
93
|
+
* @param del.parameters - Query parameters to apply to the current query.
|
|
96
94
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
97
95
|
*/
|
|
98
96
|
del({ path, parameters }, requestOptions) {
|
|
@@ -111,11 +109,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
111
109
|
return transporter.request(request, requestOptions);
|
|
112
110
|
},
|
|
113
111
|
/**
|
|
114
|
-
* Delete a
|
|
112
|
+
* Delete a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. The Query Suggestions index itself is not deleted.
|
|
115
113
|
*
|
|
116
114
|
* @summary Delete a configuration.
|
|
117
115
|
* @param deleteConfig - The deleteConfig object.
|
|
118
|
-
* @param deleteConfig.indexName -
|
|
116
|
+
* @param deleteConfig.indexName - Query Suggestions index name.
|
|
119
117
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
120
118
|
*/
|
|
121
119
|
deleteConfig({ indexName }, requestOptions) {
|
|
@@ -138,8 +136,8 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
138
136
|
*
|
|
139
137
|
* @summary Send requests to the Algolia REST API.
|
|
140
138
|
* @param get - The get object.
|
|
141
|
-
* @param get.path -
|
|
142
|
-
* @param get.parameters - Query parameters to
|
|
139
|
+
* @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
140
|
+
* @param get.parameters - Query parameters to apply to the current query.
|
|
143
141
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
144
142
|
*/
|
|
145
143
|
get({ path, parameters }, requestOptions) {
|
|
@@ -158,7 +156,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
158
156
|
return transporter.request(request, requestOptions);
|
|
159
157
|
},
|
|
160
158
|
/**
|
|
161
|
-
*
|
|
159
|
+
* List all Query Suggestions configurations of your Algolia application.
|
|
162
160
|
*
|
|
163
161
|
* @summary List configurations.
|
|
164
162
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -176,11 +174,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
176
174
|
return transporter.request(request, requestOptions);
|
|
177
175
|
},
|
|
178
176
|
/**
|
|
179
|
-
* Get
|
|
177
|
+
* Get a single Query Suggestions configuration.
|
|
180
178
|
*
|
|
181
|
-
* @summary Get a
|
|
179
|
+
* @summary Get a configuration.
|
|
182
180
|
* @param getConfig - The getConfig object.
|
|
183
|
-
* @param getConfig.indexName -
|
|
181
|
+
* @param getConfig.indexName - Query Suggestions index name.
|
|
184
182
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
185
183
|
*/
|
|
186
184
|
getConfig({ indexName }, requestOptions) {
|
|
@@ -199,11 +197,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
199
197
|
return transporter.request(request, requestOptions);
|
|
200
198
|
},
|
|
201
199
|
/**
|
|
202
|
-
*
|
|
200
|
+
* Report the status of a Query Suggestions index.
|
|
203
201
|
*
|
|
204
202
|
* @summary Get configuration status.
|
|
205
203
|
* @param getConfigStatus - The getConfigStatus object.
|
|
206
|
-
* @param getConfigStatus.indexName -
|
|
204
|
+
* @param getConfigStatus.indexName - Query Suggestions index name.
|
|
207
205
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
208
206
|
*/
|
|
209
207
|
getConfigStatus({ indexName }, requestOptions) {
|
|
@@ -222,11 +220,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
222
220
|
return transporter.request(request, requestOptions);
|
|
223
221
|
},
|
|
224
222
|
/**
|
|
225
|
-
* Get the
|
|
223
|
+
* Get the logs for a single Query Suggestions index.
|
|
226
224
|
*
|
|
227
|
-
* @summary Get
|
|
225
|
+
* @summary Get logs.
|
|
228
226
|
* @param getLogFile - The getLogFile object.
|
|
229
|
-
* @param getLogFile.indexName -
|
|
227
|
+
* @param getLogFile.indexName - Query Suggestions index name.
|
|
230
228
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
231
229
|
*/
|
|
232
230
|
getLogFile({ indexName }, requestOptions) {
|
|
@@ -249,9 +247,9 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
249
247
|
*
|
|
250
248
|
* @summary Send requests to the Algolia REST API.
|
|
251
249
|
* @param post - The post object.
|
|
252
|
-
* @param post.path -
|
|
253
|
-
* @param post.parameters - Query parameters to
|
|
254
|
-
* @param post.body -
|
|
250
|
+
* @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
251
|
+
* @param post.parameters - Query parameters to apply to the current query.
|
|
252
|
+
* @param post.body - Parameters to send with the custom request.
|
|
255
253
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
256
254
|
*/
|
|
257
255
|
post({ path, parameters, body }, requestOptions) {
|
|
@@ -275,9 +273,9 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
275
273
|
*
|
|
276
274
|
* @summary Send requests to the Algolia REST API.
|
|
277
275
|
* @param put - The put object.
|
|
278
|
-
* @param put.path -
|
|
279
|
-
* @param put.parameters - Query parameters to
|
|
280
|
-
* @param put.body -
|
|
276
|
+
* @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
277
|
+
* @param put.parameters - Query parameters to apply to the current query.
|
|
278
|
+
* @param put.body - Parameters to send with the custom request.
|
|
281
279
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
282
280
|
*/
|
|
283
281
|
put({ path, parameters, body }, requestOptions) {
|
|
@@ -297,23 +295,23 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
297
295
|
return transporter.request(request, requestOptions);
|
|
298
296
|
},
|
|
299
297
|
/**
|
|
300
|
-
* Update
|
|
298
|
+
* Update a QuerySuggestions configuration.
|
|
301
299
|
*
|
|
302
300
|
* @summary Update a configuration.
|
|
303
301
|
* @param updateConfig - The updateConfig object.
|
|
304
|
-
* @param updateConfig.indexName -
|
|
305
|
-
* @param updateConfig.
|
|
302
|
+
* @param updateConfig.indexName - Query Suggestions index name.
|
|
303
|
+
* @param updateConfig.querySuggestionsConfiguration - The querySuggestionsConfiguration object.
|
|
306
304
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
307
305
|
*/
|
|
308
|
-
updateConfig({ indexName,
|
|
306
|
+
updateConfig({ indexName, querySuggestionsConfiguration }, requestOptions) {
|
|
309
307
|
if (!indexName) {
|
|
310
308
|
throw new Error('Parameter `indexName` is required when calling `updateConfig`.');
|
|
311
309
|
}
|
|
312
|
-
if (!
|
|
313
|
-
throw new Error('Parameter `
|
|
310
|
+
if (!querySuggestionsConfiguration) {
|
|
311
|
+
throw new Error('Parameter `querySuggestionsConfiguration` is required when calling `updateConfig`.');
|
|
314
312
|
}
|
|
315
|
-
if (!
|
|
316
|
-
throw new Error('Parameter `
|
|
313
|
+
if (!querySuggestionsConfiguration.sourceIndices) {
|
|
314
|
+
throw new Error('Parameter `querySuggestionsConfiguration.sourceIndices` is required when calling `updateConfig`.');
|
|
317
315
|
}
|
|
318
316
|
const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));
|
|
319
317
|
const headers = {};
|
|
@@ -323,7 +321,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
323
321
|
path: requestPath,
|
|
324
322
|
queryParameters,
|
|
325
323
|
headers,
|
|
326
|
-
data:
|
|
324
|
+
data: querySuggestionsConfiguration,
|
|
327
325
|
};
|
|
328
326
|
return transporter.request(request, requestOptions);
|
|
329
327
|
},
|
|
@@ -662,7 +662,7 @@ function createXhrRequester() {
|
|
|
662
662
|
}
|
|
663
663
|
|
|
664
664
|
// 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.
|
|
665
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
665
|
+
const apiClientVersion = '5.0.0-alpha.76';
|
|
666
666
|
const REGIONS = ['eu', 'us'];
|
|
667
667
|
function getDefaultHosts(region) {
|
|
668
668
|
const url = 'query-suggestions.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -720,15 +720,15 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
720
720
|
transporter.algoliaAgent.add({ segment, version });
|
|
721
721
|
},
|
|
722
722
|
/**
|
|
723
|
-
* Create a
|
|
723
|
+
* Create a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
|
|
724
724
|
*
|
|
725
725
|
* @summary Create a configuration.
|
|
726
|
-
* @param
|
|
726
|
+
* @param querySuggestionsConfigurationWithIndex - The querySuggestionsConfigurationWithIndex object.
|
|
727
727
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
728
728
|
*/
|
|
729
|
-
createConfig(
|
|
730
|
-
if (!
|
|
731
|
-
throw new Error('Parameter `
|
|
729
|
+
createConfig(querySuggestionsConfigurationWithIndex, requestOptions) {
|
|
730
|
+
if (!querySuggestionsConfigurationWithIndex) {
|
|
731
|
+
throw new Error('Parameter `querySuggestionsConfigurationWithIndex` is required when calling `createConfig`.');
|
|
732
732
|
}
|
|
733
733
|
const requestPath = '/1/configs';
|
|
734
734
|
const headers = {};
|
|
@@ -738,7 +738,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
738
738
|
path: requestPath,
|
|
739
739
|
queryParameters,
|
|
740
740
|
headers,
|
|
741
|
-
data:
|
|
741
|
+
data: querySuggestionsConfigurationWithIndex,
|
|
742
742
|
};
|
|
743
743
|
return transporter.request(request, requestOptions);
|
|
744
744
|
},
|
|
@@ -747,8 +747,8 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
747
747
|
*
|
|
748
748
|
* @summary Send requests to the Algolia REST API.
|
|
749
749
|
* @param del - The del object.
|
|
750
|
-
* @param del.path -
|
|
751
|
-
* @param del.parameters - Query parameters to
|
|
750
|
+
* @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
751
|
+
* @param del.parameters - Query parameters to apply to the current query.
|
|
752
752
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
753
753
|
*/
|
|
754
754
|
del({ path, parameters }, requestOptions) {
|
|
@@ -767,11 +767,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
767
767
|
return transporter.request(request, requestOptions);
|
|
768
768
|
},
|
|
769
769
|
/**
|
|
770
|
-
* Delete a
|
|
770
|
+
* Delete a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. The Query Suggestions index itself is not deleted.
|
|
771
771
|
*
|
|
772
772
|
* @summary Delete a configuration.
|
|
773
773
|
* @param deleteConfig - The deleteConfig object.
|
|
774
|
-
* @param deleteConfig.indexName -
|
|
774
|
+
* @param deleteConfig.indexName - Query Suggestions index name.
|
|
775
775
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
776
776
|
*/
|
|
777
777
|
deleteConfig({ indexName }, requestOptions) {
|
|
@@ -794,8 +794,8 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
794
794
|
*
|
|
795
795
|
* @summary Send requests to the Algolia REST API.
|
|
796
796
|
* @param get - The get object.
|
|
797
|
-
* @param get.path -
|
|
798
|
-
* @param get.parameters - Query parameters to
|
|
797
|
+
* @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
798
|
+
* @param get.parameters - Query parameters to apply to the current query.
|
|
799
799
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
800
800
|
*/
|
|
801
801
|
get({ path, parameters }, requestOptions) {
|
|
@@ -814,7 +814,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
814
814
|
return transporter.request(request, requestOptions);
|
|
815
815
|
},
|
|
816
816
|
/**
|
|
817
|
-
*
|
|
817
|
+
* List all Query Suggestions configurations of your Algolia application.
|
|
818
818
|
*
|
|
819
819
|
* @summary List configurations.
|
|
820
820
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -832,11 +832,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
832
832
|
return transporter.request(request, requestOptions);
|
|
833
833
|
},
|
|
834
834
|
/**
|
|
835
|
-
* Get
|
|
835
|
+
* Get a single Query Suggestions configuration.
|
|
836
836
|
*
|
|
837
|
-
* @summary Get a
|
|
837
|
+
* @summary Get a configuration.
|
|
838
838
|
* @param getConfig - The getConfig object.
|
|
839
|
-
* @param getConfig.indexName -
|
|
839
|
+
* @param getConfig.indexName - Query Suggestions index name.
|
|
840
840
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
841
841
|
*/
|
|
842
842
|
getConfig({ indexName }, requestOptions) {
|
|
@@ -855,11 +855,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
855
855
|
return transporter.request(request, requestOptions);
|
|
856
856
|
},
|
|
857
857
|
/**
|
|
858
|
-
*
|
|
858
|
+
* Report the status of a Query Suggestions index.
|
|
859
859
|
*
|
|
860
860
|
* @summary Get configuration status.
|
|
861
861
|
* @param getConfigStatus - The getConfigStatus object.
|
|
862
|
-
* @param getConfigStatus.indexName -
|
|
862
|
+
* @param getConfigStatus.indexName - Query Suggestions index name.
|
|
863
863
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
864
864
|
*/
|
|
865
865
|
getConfigStatus({ indexName }, requestOptions) {
|
|
@@ -878,11 +878,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
878
878
|
return transporter.request(request, requestOptions);
|
|
879
879
|
},
|
|
880
880
|
/**
|
|
881
|
-
* Get the
|
|
881
|
+
* Get the logs for a single Query Suggestions index.
|
|
882
882
|
*
|
|
883
|
-
* @summary Get
|
|
883
|
+
* @summary Get logs.
|
|
884
884
|
* @param getLogFile - The getLogFile object.
|
|
885
|
-
* @param getLogFile.indexName -
|
|
885
|
+
* @param getLogFile.indexName - Query Suggestions index name.
|
|
886
886
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
887
887
|
*/
|
|
888
888
|
getLogFile({ indexName }, requestOptions) {
|
|
@@ -905,9 +905,9 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
905
905
|
*
|
|
906
906
|
* @summary Send requests to the Algolia REST API.
|
|
907
907
|
* @param post - The post object.
|
|
908
|
-
* @param post.path -
|
|
909
|
-
* @param post.parameters - Query parameters to
|
|
910
|
-
* @param post.body -
|
|
908
|
+
* @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
909
|
+
* @param post.parameters - Query parameters to apply to the current query.
|
|
910
|
+
* @param post.body - Parameters to send with the custom request.
|
|
911
911
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
912
912
|
*/
|
|
913
913
|
post({ path, parameters, body }, requestOptions) {
|
|
@@ -931,9 +931,9 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
931
931
|
*
|
|
932
932
|
* @summary Send requests to the Algolia REST API.
|
|
933
933
|
* @param put - The put object.
|
|
934
|
-
* @param put.path -
|
|
935
|
-
* @param put.parameters - Query parameters to
|
|
936
|
-
* @param put.body -
|
|
934
|
+
* @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
935
|
+
* @param put.parameters - Query parameters to apply to the current query.
|
|
936
|
+
* @param put.body - Parameters to send with the custom request.
|
|
937
937
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
938
938
|
*/
|
|
939
939
|
put({ path, parameters, body }, requestOptions) {
|
|
@@ -953,23 +953,23 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
953
953
|
return transporter.request(request, requestOptions);
|
|
954
954
|
},
|
|
955
955
|
/**
|
|
956
|
-
* Update
|
|
956
|
+
* Update a QuerySuggestions configuration.
|
|
957
957
|
*
|
|
958
958
|
* @summary Update a configuration.
|
|
959
959
|
* @param updateConfig - The updateConfig object.
|
|
960
|
-
* @param updateConfig.indexName -
|
|
961
|
-
* @param updateConfig.
|
|
960
|
+
* @param updateConfig.indexName - Query Suggestions index name.
|
|
961
|
+
* @param updateConfig.querySuggestionsConfiguration - The querySuggestionsConfiguration object.
|
|
962
962
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
963
963
|
*/
|
|
964
|
-
updateConfig({ indexName,
|
|
964
|
+
updateConfig({ indexName, querySuggestionsConfiguration }, requestOptions) {
|
|
965
965
|
if (!indexName) {
|
|
966
966
|
throw new Error('Parameter `indexName` is required when calling `updateConfig`.');
|
|
967
967
|
}
|
|
968
|
-
if (!
|
|
969
|
-
throw new Error('Parameter `
|
|
968
|
+
if (!querySuggestionsConfiguration) {
|
|
969
|
+
throw new Error('Parameter `querySuggestionsConfiguration` is required when calling `updateConfig`.');
|
|
970
970
|
}
|
|
971
|
-
if (!
|
|
972
|
-
throw new Error('Parameter `
|
|
971
|
+
if (!querySuggestionsConfiguration.sourceIndices) {
|
|
972
|
+
throw new Error('Parameter `querySuggestionsConfiguration.sourceIndices` is required when calling `updateConfig`.');
|
|
973
973
|
}
|
|
974
974
|
const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));
|
|
975
975
|
const headers = {};
|
|
@@ -979,7 +979,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
979
979
|
path: requestPath,
|
|
980
980
|
queryParameters,
|
|
981
981
|
headers,
|
|
982
|
-
data:
|
|
982
|
+
data: querySuggestionsConfiguration,
|
|
983
983
|
};
|
|
984
984
|
return transporter.request(request, requestOptions);
|
|
985
985
|
},
|
|
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT
|
|
|
2
2
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
3
|
|
|
4
4
|
// 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.
|
|
5
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
5
|
+
const apiClientVersion = '5.0.0-alpha.76';
|
|
6
6
|
const REGIONS = ['eu', 'us'];
|
|
7
7
|
function getDefaultHosts(region) {
|
|
8
8
|
const url = 'query-suggestions.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -60,15 +60,15 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
60
60
|
transporter.algoliaAgent.add({ segment, version });
|
|
61
61
|
},
|
|
62
62
|
/**
|
|
63
|
-
* Create a
|
|
63
|
+
* Create a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
|
|
64
64
|
*
|
|
65
65
|
* @summary Create a configuration.
|
|
66
|
-
* @param
|
|
66
|
+
* @param querySuggestionsConfigurationWithIndex - The querySuggestionsConfigurationWithIndex object.
|
|
67
67
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
68
68
|
*/
|
|
69
|
-
createConfig(
|
|
70
|
-
if (!
|
|
71
|
-
throw new Error('Parameter `
|
|
69
|
+
createConfig(querySuggestionsConfigurationWithIndex, requestOptions) {
|
|
70
|
+
if (!querySuggestionsConfigurationWithIndex) {
|
|
71
|
+
throw new Error('Parameter `querySuggestionsConfigurationWithIndex` is required when calling `createConfig`.');
|
|
72
72
|
}
|
|
73
73
|
const requestPath = '/1/configs';
|
|
74
74
|
const headers = {};
|
|
@@ -78,7 +78,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
78
78
|
path: requestPath,
|
|
79
79
|
queryParameters,
|
|
80
80
|
headers,
|
|
81
|
-
data:
|
|
81
|
+
data: querySuggestionsConfigurationWithIndex,
|
|
82
82
|
};
|
|
83
83
|
return transporter.request(request, requestOptions);
|
|
84
84
|
},
|
|
@@ -87,8 +87,8 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
87
87
|
*
|
|
88
88
|
* @summary Send requests to the Algolia REST API.
|
|
89
89
|
* @param del - The del object.
|
|
90
|
-
* @param del.path -
|
|
91
|
-
* @param del.parameters - Query parameters to
|
|
90
|
+
* @param del.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
91
|
+
* @param del.parameters - Query parameters to apply to the current query.
|
|
92
92
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
93
93
|
*/
|
|
94
94
|
del({ path, parameters }, requestOptions) {
|
|
@@ -107,11 +107,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
107
107
|
return transporter.request(request, requestOptions);
|
|
108
108
|
},
|
|
109
109
|
/**
|
|
110
|
-
* Delete a
|
|
110
|
+
* Delete a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. The Query Suggestions index itself is not deleted.
|
|
111
111
|
*
|
|
112
112
|
* @summary Delete a configuration.
|
|
113
113
|
* @param deleteConfig - The deleteConfig object.
|
|
114
|
-
* @param deleteConfig.indexName -
|
|
114
|
+
* @param deleteConfig.indexName - Query Suggestions index name.
|
|
115
115
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
116
116
|
*/
|
|
117
117
|
deleteConfig({ indexName }, requestOptions) {
|
|
@@ -134,8 +134,8 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
134
134
|
*
|
|
135
135
|
* @summary Send requests to the Algolia REST API.
|
|
136
136
|
* @param get - The get object.
|
|
137
|
-
* @param get.path -
|
|
138
|
-
* @param get.parameters - Query parameters to
|
|
137
|
+
* @param get.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
138
|
+
* @param get.parameters - Query parameters to apply to the current query.
|
|
139
139
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
140
140
|
*/
|
|
141
141
|
get({ path, parameters }, requestOptions) {
|
|
@@ -154,7 +154,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
154
154
|
return transporter.request(request, requestOptions);
|
|
155
155
|
},
|
|
156
156
|
/**
|
|
157
|
-
*
|
|
157
|
+
* List all Query Suggestions configurations of your Algolia application.
|
|
158
158
|
*
|
|
159
159
|
* @summary List configurations.
|
|
160
160
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -172,11 +172,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
172
172
|
return transporter.request(request, requestOptions);
|
|
173
173
|
},
|
|
174
174
|
/**
|
|
175
|
-
* Get
|
|
175
|
+
* Get a single Query Suggestions configuration.
|
|
176
176
|
*
|
|
177
|
-
* @summary Get a
|
|
177
|
+
* @summary Get a configuration.
|
|
178
178
|
* @param getConfig - The getConfig object.
|
|
179
|
-
* @param getConfig.indexName -
|
|
179
|
+
* @param getConfig.indexName - Query Suggestions index name.
|
|
180
180
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
181
181
|
*/
|
|
182
182
|
getConfig({ indexName }, requestOptions) {
|
|
@@ -195,11 +195,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
195
195
|
return transporter.request(request, requestOptions);
|
|
196
196
|
},
|
|
197
197
|
/**
|
|
198
|
-
*
|
|
198
|
+
* Report the status of a Query Suggestions index.
|
|
199
199
|
*
|
|
200
200
|
* @summary Get configuration status.
|
|
201
201
|
* @param getConfigStatus - The getConfigStatus object.
|
|
202
|
-
* @param getConfigStatus.indexName -
|
|
202
|
+
* @param getConfigStatus.indexName - Query Suggestions index name.
|
|
203
203
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
204
204
|
*/
|
|
205
205
|
getConfigStatus({ indexName }, requestOptions) {
|
|
@@ -218,11 +218,11 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
218
218
|
return transporter.request(request, requestOptions);
|
|
219
219
|
},
|
|
220
220
|
/**
|
|
221
|
-
* Get the
|
|
221
|
+
* Get the logs for a single Query Suggestions index.
|
|
222
222
|
*
|
|
223
|
-
* @summary Get
|
|
223
|
+
* @summary Get logs.
|
|
224
224
|
* @param getLogFile - The getLogFile object.
|
|
225
|
-
* @param getLogFile.indexName -
|
|
225
|
+
* @param getLogFile.indexName - Query Suggestions index name.
|
|
226
226
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
227
227
|
*/
|
|
228
228
|
getLogFile({ indexName }, requestOptions) {
|
|
@@ -245,9 +245,9 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
245
245
|
*
|
|
246
246
|
* @summary Send requests to the Algolia REST API.
|
|
247
247
|
* @param post - The post object.
|
|
248
|
-
* @param post.path -
|
|
249
|
-
* @param post.parameters - Query parameters to
|
|
250
|
-
* @param post.body -
|
|
248
|
+
* @param post.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
249
|
+
* @param post.parameters - Query parameters to apply to the current query.
|
|
250
|
+
* @param post.body - Parameters to send with the custom request.
|
|
251
251
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
252
252
|
*/
|
|
253
253
|
post({ path, parameters, body }, requestOptions) {
|
|
@@ -271,9 +271,9 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
271
271
|
*
|
|
272
272
|
* @summary Send requests to the Algolia REST API.
|
|
273
273
|
* @param put - The put object.
|
|
274
|
-
* @param put.path -
|
|
275
|
-
* @param put.parameters - Query parameters to
|
|
276
|
-
* @param put.body -
|
|
274
|
+
* @param put.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
275
|
+
* @param put.parameters - Query parameters to apply to the current query.
|
|
276
|
+
* @param put.body - Parameters to send with the custom request.
|
|
277
277
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
278
278
|
*/
|
|
279
279
|
put({ path, parameters, body }, requestOptions) {
|
|
@@ -293,23 +293,23 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
293
293
|
return transporter.request(request, requestOptions);
|
|
294
294
|
},
|
|
295
295
|
/**
|
|
296
|
-
* Update
|
|
296
|
+
* Update a QuerySuggestions configuration.
|
|
297
297
|
*
|
|
298
298
|
* @summary Update a configuration.
|
|
299
299
|
* @param updateConfig - The updateConfig object.
|
|
300
|
-
* @param updateConfig.indexName -
|
|
301
|
-
* @param updateConfig.
|
|
300
|
+
* @param updateConfig.indexName - Query Suggestions index name.
|
|
301
|
+
* @param updateConfig.querySuggestionsConfiguration - The querySuggestionsConfiguration object.
|
|
302
302
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
303
303
|
*/
|
|
304
|
-
updateConfig({ indexName,
|
|
304
|
+
updateConfig({ indexName, querySuggestionsConfiguration }, requestOptions) {
|
|
305
305
|
if (!indexName) {
|
|
306
306
|
throw new Error('Parameter `indexName` is required when calling `updateConfig`.');
|
|
307
307
|
}
|
|
308
|
-
if (!
|
|
309
|
-
throw new Error('Parameter `
|
|
308
|
+
if (!querySuggestionsConfiguration) {
|
|
309
|
+
throw new Error('Parameter `querySuggestionsConfiguration` is required when calling `updateConfig`.');
|
|
310
310
|
}
|
|
311
|
-
if (!
|
|
312
|
-
throw new Error('Parameter `
|
|
311
|
+
if (!querySuggestionsConfiguration.sourceIndices) {
|
|
312
|
+
throw new Error('Parameter `querySuggestionsConfiguration.sourceIndices` is required when calling `updateConfig`.');
|
|
313
313
|
}
|
|
314
314
|
const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));
|
|
315
315
|
const headers = {};
|
|
@@ -319,7 +319,7 @@ function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption
|
|
|
319
319
|
path: requestPath,
|
|
320
320
|
queryParameters,
|
|
321
321
|
headers,
|
|
322
|
-
data:
|
|
322
|
+
data: querySuggestionsConfiguration,
|
|
323
323
|
};
|
|
324
324
|
return transporter.request(request, requestOptions);
|
|
325
325
|
},
|