@algolia/client-query-suggestions 5.2.5 → 5.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/browser.d.ts CHANGED
@@ -1,12 +1,5 @@
1
1
  import * as _algolia_client_common from '@algolia/client-common';
2
- import { ClientOptions } from '@algolia/client-common';
3
-
4
- type AppID = {
5
- /**
6
- * Algolia application ID to which this Query Suggestions configuration belongs.
7
- */
8
- appID?: string;
9
- };
2
+ import { CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
10
3
 
11
4
  type BaseResponse = {
12
5
  /**
@@ -19,29 +12,6 @@ type BaseResponse = {
19
12
  message?: string;
20
13
  };
21
14
 
22
- type ConfigStatus = {
23
- /**
24
- * Name of the Query Suggestions index (case-sensitive).
25
- */
26
- indexName?: string;
27
- /**
28
- * Whether the creation or update of the Query Suggestions index is in progress.
29
- */
30
- isRunning?: boolean;
31
- /**
32
- * Date and time when the Query Suggestions index was last built, in RFC 3339 format.
33
- */
34
- lastBuiltAt?: string;
35
- /**
36
- * Date and time when the Query Suggestions index was last updated successfully.
37
- */
38
- lastSuccessfulBuiltAt?: string;
39
- /**
40
- * Duration of the last successful build in seconds.
41
- */
42
- lastSuccessfulBuildDuration?: string;
43
- };
44
-
45
15
  /**
46
16
  * Languages for deduplicating singular and plural suggestions. If specified, only the more popular form is included.
47
17
  */
@@ -107,44 +77,6 @@ type Configuration = {
107
77
  allowSpecialCharacters?: boolean;
108
78
  };
109
79
 
110
- /**
111
- * Query Suggestions configuration.
112
- */
113
- type ConfigurationWithIndex = Configuration & Record<string, unknown>;
114
-
115
- /**
116
- * API response for retrieving Query Suggestions configurations.
117
- */
118
- type ConfigurationResponse = AppID & ConfigurationWithIndex;
119
-
120
- /**
121
- * Error.
122
- */
123
- type ErrorBase = Record<string, any> & {
124
- message?: string;
125
- };
126
-
127
- /**
128
- * Type of log entry. - `SKIP`. A query is skipped because it doesn\'t match the conditions for successful inclusion. For example, when a query doesn\'t generate enough search results. - `INFO`. An informative log entry. - `ERROR`. The Query Suggestions process encountered an error.
129
- */
130
- type LogLevel = 'ERROR' | 'INFO' | 'SKIP';
131
-
132
- type LogFile = {
133
- /**
134
- * Date and time of the log entry, in RFC 3339 format.
135
- */
136
- timestamp?: string;
137
- level?: LogLevel;
138
- /**
139
- * Details about this log entry.
140
- */
141
- message?: string;
142
- /**
143
- * Level indicating the position of a suggestion in a hierarchy of records. For example, a `contextLevel` of 1 indicates that this suggestion belongs to a previous suggestion with `contextLevel` 0.
144
- */
145
- contextLevel?: number;
146
- };
147
-
148
80
  /**
149
81
  * Properties for the `customDelete` method.
150
82
  */
@@ -252,31 +184,226 @@ type UpdateConfigProps = {
252
184
  configuration: Configuration;
253
185
  };
254
186
 
255
- declare const apiClientVersion = "5.2.5";
256
- declare const REGIONS: readonly ["eu", "us"];
257
- type Region = (typeof REGIONS)[number];
187
+ type ConfigStatus = {
188
+ /**
189
+ * Name of the Query Suggestions index (case-sensitive).
190
+ */
191
+ indexName?: string;
192
+ /**
193
+ * Whether the creation or update of the Query Suggestions index is in progress.
194
+ */
195
+ isRunning?: boolean;
196
+ /**
197
+ * Date and time when the Query Suggestions index was last built, in RFC 3339 format.
198
+ */
199
+ lastBuiltAt?: string;
200
+ /**
201
+ * Date and time when the Query Suggestions index was last updated successfully.
202
+ */
203
+ lastSuccessfulBuiltAt?: string;
204
+ /**
205
+ * Duration of the last successful build in seconds.
206
+ */
207
+ lastSuccessfulBuildDuration?: string;
208
+ };
209
+
210
+ type AppID = {
211
+ /**
212
+ * Algolia application ID to which this Query Suggestions configuration belongs.
213
+ */
214
+ appID?: string;
215
+ };
216
+
217
+ /**
218
+ * Query Suggestions configuration.
219
+ */
220
+ type ConfigurationWithIndex = Configuration & Record<string, unknown>;
258
221
 
259
222
  /**
260
- * The client type.
223
+ * API response for retrieving Query Suggestions configurations.
261
224
  */
262
- type QuerySuggestionsClient = ReturnType<typeof querySuggestionsClient>;
263
- declare function querySuggestionsClient(appId: string, apiKey: string, region: Region, options?: ClientOptions): {
225
+ type ConfigurationResponse = AppID & ConfigurationWithIndex;
226
+
227
+ /**
228
+ * Type of log entry. - `SKIP`. A query is skipped because it doesn\'t match the conditions for successful inclusion. For example, when a query doesn\'t generate enough search results. - `INFO`. An informative log entry. - `ERROR`. The Query Suggestions process encountered an error.
229
+ */
230
+ type LogLevel = 'ERROR' | 'INFO' | 'SKIP';
231
+
232
+ type LogFile = {
233
+ /**
234
+ * Date and time of the log entry, in RFC 3339 format.
235
+ */
236
+ timestamp?: string;
237
+ level?: LogLevel;
238
+ /**
239
+ * Details about this log entry.
240
+ */
241
+ message?: string;
242
+ /**
243
+ * Level indicating the position of a suggestion in a hierarchy of records. For example, a `contextLevel` of 1 indicates that this suggestion belongs to a previous suggestion with `contextLevel` 0.
244
+ */
245
+ contextLevel?: number;
246
+ };
247
+
248
+ declare const apiClientVersion = "5.3.0";
249
+ declare const REGIONS: readonly ["eu", "us"];
250
+ type Region = (typeof REGIONS)[number];
251
+ declare function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
252
+ region: Region;
253
+ }): {
264
254
  transporter: _algolia_client_common.Transporter;
255
+ /**
256
+ * The `appId` currently in use.
257
+ */
265
258
  appId: string;
259
+ /**
260
+ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
261
+ */
266
262
  clearCache(): Promise<void>;
263
+ /**
264
+ * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
265
+ */
267
266
  readonly _ua: string;
267
+ /**
268
+ * Adds a `segment` to the `x-algolia-agent` sent with every requests.
269
+ *
270
+ * @param segment - The algolia agent (user-agent) segment to add.
271
+ * @param version - The version of the agent.
272
+ */
268
273
  addAlgoliaAgent(segment: string, version?: string): void;
269
- createConfig(configurationWithIndex: ConfigurationWithIndex, requestOptions?: _algolia_client_common.RequestOptions): Promise<BaseResponse>;
270
- customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<Record<string, unknown>>;
271
- customGet({ path, parameters }: CustomGetProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<Record<string, unknown>>;
272
- customPost({ path, parameters, body }: CustomPostProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<Record<string, unknown>>;
273
- customPut({ path, parameters, body }: CustomPutProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<Record<string, unknown>>;
274
- deleteConfig({ indexName }: DeleteConfigProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<BaseResponse>;
275
- getAllConfigs(requestOptions?: _algolia_client_common.RequestOptions): Promise<ConfigurationResponse[]>;
276
- getConfig({ indexName }: GetConfigProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<ConfigurationResponse>;
277
- getConfigStatus({ indexName }: GetConfigStatusProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<ConfigStatus>;
278
- getLogFile({ indexName }: GetLogFileProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<LogFile>;
279
- updateConfig({ indexName, configuration }: UpdateConfigProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<BaseResponse>;
274
+ /**
275
+ * Helper method to switch the API key used to authenticate the requests.
276
+ *
277
+ * @param params - Method params.
278
+ * @param params.apiKey - The new API Key to use.
279
+ */
280
+ setClientApiKey({ apiKey }: {
281
+ apiKey: string;
282
+ }): void;
283
+ /**
284
+ * Creates a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
285
+ *
286
+ * Required API Key ACLs:
287
+ * - editSettings.
288
+ *
289
+ * @param configurationWithIndex - The configurationWithIndex object.
290
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
291
+ */
292
+ createConfig(configurationWithIndex: ConfigurationWithIndex, requestOptions?: RequestOptions): Promise<BaseResponse>;
293
+ /**
294
+ * This method allow you to send requests to the Algolia REST API.
295
+ *
296
+ * @param customDelete - The customDelete object.
297
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
298
+ * @param customDelete.parameters - Query parameters to apply to the current query.
299
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
300
+ */
301
+ customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
302
+ /**
303
+ * This method allow you to send requests to the Algolia REST API.
304
+ *
305
+ * @param customGet - The customGet object.
306
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
307
+ * @param customGet.parameters - Query parameters to apply to the current query.
308
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
309
+ */
310
+ customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
311
+ /**
312
+ * This method allow you to send requests to the Algolia REST API.
313
+ *
314
+ * @param customPost - The customPost object.
315
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
316
+ * @param customPost.parameters - Query parameters to apply to the current query.
317
+ * @param customPost.body - Parameters to send with the custom request.
318
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
319
+ */
320
+ customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
321
+ /**
322
+ * This method allow you to send requests to the Algolia REST API.
323
+ *
324
+ * @param customPut - The customPut object.
325
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
326
+ * @param customPut.parameters - Query parameters to apply to the current query.
327
+ * @param customPut.body - Parameters to send with the custom request.
328
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
329
+ */
330
+ customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
331
+ /**
332
+ * 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` operation.
333
+ *
334
+ * Required API Key ACLs:
335
+ * - editSettings.
336
+ *
337
+ * @param deleteConfig - The deleteConfig object.
338
+ * @param deleteConfig.indexName - Query Suggestions index name.
339
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
340
+ */
341
+ deleteConfig({ indexName }: DeleteConfigProps, requestOptions?: RequestOptions): Promise<BaseResponse>;
342
+ /**
343
+ * Retrieves all Query Suggestions configurations of your Algolia application.
344
+ *
345
+ * Required API Key ACLs:
346
+ * - settings.
347
+ *
348
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
349
+ */
350
+ getAllConfigs(requestOptions?: RequestOptions): Promise<ConfigurationResponse[]>;
351
+ /**
352
+ * Retrieves a single Query Suggestions configuration by its index name.
353
+ *
354
+ * Required API Key ACLs:
355
+ * - settings.
356
+ *
357
+ * @param getConfig - The getConfig object.
358
+ * @param getConfig.indexName - Query Suggestions index name.
359
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
360
+ */
361
+ getConfig({ indexName }: GetConfigProps, requestOptions?: RequestOptions): Promise<ConfigurationResponse>;
362
+ /**
363
+ * Reports the status of a Query Suggestions index.
364
+ *
365
+ * Required API Key ACLs:
366
+ * - settings.
367
+ *
368
+ * @param getConfigStatus - The getConfigStatus object.
369
+ * @param getConfigStatus.indexName - Query Suggestions index name.
370
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
371
+ */
372
+ getConfigStatus({ indexName }: GetConfigStatusProps, requestOptions?: RequestOptions): Promise<ConfigStatus>;
373
+ /**
374
+ * Retrieves the logs for a single Query Suggestions index.
375
+ *
376
+ * Required API Key ACLs:
377
+ * - settings.
378
+ *
379
+ * @param getLogFile - The getLogFile object.
380
+ * @param getLogFile.indexName - Query Suggestions index name.
381
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
382
+ */
383
+ getLogFile({ indexName }: GetLogFileProps, requestOptions?: RequestOptions): Promise<LogFile>;
384
+ /**
385
+ * Updates a QuerySuggestions configuration.
386
+ *
387
+ * Required API Key ACLs:
388
+ * - editSettings.
389
+ *
390
+ * @param updateConfig - The updateConfig object.
391
+ * @param updateConfig.indexName - Query Suggestions index name.
392
+ * @param updateConfig.configuration - The configuration object.
393
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
394
+ */
395
+ updateConfig({ indexName, configuration }: UpdateConfigProps, requestOptions?: RequestOptions): Promise<BaseResponse>;
280
396
  };
281
397
 
398
+ /**
399
+ * Error.
400
+ */
401
+ type ErrorBase = Record<string, any> & {
402
+ message?: string;
403
+ };
404
+
405
+ type QuerySuggestionsClient = ReturnType<typeof createQuerySuggestionsClient>;
406
+
407
+ declare function querySuggestionsClient(appId: string, apiKey: string, region: Region, options?: ClientOptions): QuerySuggestionsClient;
408
+
282
409
  export { type AppID, type BaseResponse, type ConfigStatus, type Configuration, type ConfigurationResponse, type ConfigurationWithIndex, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteConfigProps, type ErrorBase, type Facet, type GetConfigProps, type GetConfigStatusProps, type GetLogFileProps, type Languages, type LogFile, type LogLevel, type QuerySuggestionsClient, type Region, type SourceIndex, type UpdateConfigProps, apiClientVersion, querySuggestionsClient };
@@ -11,7 +11,7 @@ import { createXhrRequester } from "@algolia/requester-browser-xhr";
11
11
 
12
12
  // src/querySuggestionsClient.ts
13
13
  import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
14
- var apiClientVersion = "5.2.5";
14
+ var apiClientVersion = "5.3.0";
15
15
  var REGIONS = ["eu", "us"];
16
16
  function getDefaultHosts(region) {
17
17
  const url = "query-suggestions.{region}.algolia.com".replace("{region}", region);
@@ -26,26 +26,25 @@ function createQuerySuggestionsClient({
26
26
  ...options
27
27
  }) {
28
28
  const auth = createAuth(appIdOption, apiKeyOption, authMode);
29
- const transporter = createTransporter({
30
- hosts: getDefaultHosts(regionOption),
31
- ...options,
32
- algoliaAgent: getAlgoliaAgent({
33
- algoliaAgents,
34
- client: "QuerySuggestions",
35
- version: apiClientVersion
36
- }),
37
- baseHeaders: {
38
- "content-type": "text/plain",
39
- ...auth.headers(),
40
- ...options.baseHeaders
41
- },
42
- baseQueryParameters: {
43
- ...auth.queryParameters(),
44
- ...options.baseQueryParameters
45
- }
46
- });
47
29
  return {
48
- transporter,
30
+ transporter: createTransporter({
31
+ hosts: getDefaultHosts(regionOption),
32
+ ...options,
33
+ algoliaAgent: getAlgoliaAgent({
34
+ algoliaAgents,
35
+ client: "QuerySuggestions",
36
+ version: apiClientVersion
37
+ }),
38
+ baseHeaders: {
39
+ "content-type": "text/plain",
40
+ ...auth.headers(),
41
+ ...options.baseHeaders
42
+ },
43
+ baseQueryParameters: {
44
+ ...auth.queryParameters(),
45
+ ...options.baseQueryParameters
46
+ }
47
+ }),
49
48
  /**
50
49
  * The `appId` currently in use.
51
50
  */
@@ -54,13 +53,15 @@ function createQuerySuggestionsClient({
54
53
  * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
55
54
  */
56
55
  clearCache() {
57
- return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => void 0);
56
+ return Promise.all([this.transporter.requestsCache.clear(), this.transporter.responsesCache.clear()]).then(
57
+ () => void 0
58
+ );
58
59
  },
59
60
  /**
60
61
  * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
61
62
  */
62
63
  get _ua() {
63
- return transporter.algoliaAgent.value;
64
+ return this.transporter.algoliaAgent.value;
64
65
  },
65
66
  /**
66
67
  * Adds a `segment` to the `x-algolia-agent` sent with every requests.
@@ -69,7 +70,16 @@ function createQuerySuggestionsClient({
69
70
  * @param version - The version of the agent.
70
71
  */
71
72
  addAlgoliaAgent(segment, version) {
72
- transporter.algoliaAgent.add({ segment, version });
73
+ this.transporter.algoliaAgent.add({ segment, version });
74
+ },
75
+ /**
76
+ * Helper method to switch the API key used to authenticate the requests.
77
+ *
78
+ * @param params - Method params.
79
+ * @param params.apiKey - The new API Key to use.
80
+ */
81
+ setClientApiKey({ apiKey }) {
82
+ this.transporter.baseHeaders["x-algolia-api-key"] = apiKey;
73
83
  },
74
84
  /**
75
85
  * Creates a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
@@ -94,7 +104,7 @@ function createQuerySuggestionsClient({
94
104
  headers,
95
105
  data: configurationWithIndex
96
106
  };
97
- return transporter.request(request, requestOptions);
107
+ return this.transporter.request(request, requestOptions);
98
108
  },
99
109
  /**
100
110
  * This method allow you to send requests to the Algolia REST API.
@@ -117,7 +127,7 @@ function createQuerySuggestionsClient({
117
127
  queryParameters,
118
128
  headers
119
129
  };
120
- return transporter.request(request, requestOptions);
130
+ return this.transporter.request(request, requestOptions);
121
131
  },
122
132
  /**
123
133
  * This method allow you to send requests to the Algolia REST API.
@@ -140,7 +150,7 @@ function createQuerySuggestionsClient({
140
150
  queryParameters,
141
151
  headers
142
152
  };
143
- return transporter.request(request, requestOptions);
153
+ return this.transporter.request(request, requestOptions);
144
154
  },
145
155
  /**
146
156
  * This method allow you to send requests to the Algolia REST API.
@@ -165,7 +175,7 @@ function createQuerySuggestionsClient({
165
175
  headers,
166
176
  data: body ? body : {}
167
177
  };
168
- return transporter.request(request, requestOptions);
178
+ return this.transporter.request(request, requestOptions);
169
179
  },
170
180
  /**
171
181
  * This method allow you to send requests to the Algolia REST API.
@@ -190,7 +200,7 @@ function createQuerySuggestionsClient({
190
200
  headers,
191
201
  data: body ? body : {}
192
202
  };
193
- return transporter.request(request, requestOptions);
203
+ return this.transporter.request(request, requestOptions);
194
204
  },
195
205
  /**
196
206
  * 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` operation.
@@ -215,7 +225,7 @@ function createQuerySuggestionsClient({
215
225
  queryParameters,
216
226
  headers
217
227
  };
218
- return transporter.request(request, requestOptions);
228
+ return this.transporter.request(request, requestOptions);
219
229
  },
220
230
  /**
221
231
  * Retrieves all Query Suggestions configurations of your Algolia application.
@@ -235,7 +245,7 @@ function createQuerySuggestionsClient({
235
245
  queryParameters,
236
246
  headers
237
247
  };
238
- return transporter.request(request, requestOptions);
248
+ return this.transporter.request(request, requestOptions);
239
249
  },
240
250
  /**
241
251
  * Retrieves a single Query Suggestions configuration by its index name.
@@ -260,7 +270,7 @@ function createQuerySuggestionsClient({
260
270
  queryParameters,
261
271
  headers
262
272
  };
263
- return transporter.request(request, requestOptions);
273
+ return this.transporter.request(request, requestOptions);
264
274
  },
265
275
  /**
266
276
  * Reports the status of a Query Suggestions index.
@@ -285,7 +295,7 @@ function createQuerySuggestionsClient({
285
295
  queryParameters,
286
296
  headers
287
297
  };
288
- return transporter.request(request, requestOptions);
298
+ return this.transporter.request(request, requestOptions);
289
299
  },
290
300
  /**
291
301
  * Retrieves the logs for a single Query Suggestions index.
@@ -310,7 +320,7 @@ function createQuerySuggestionsClient({
310
320
  queryParameters,
311
321
  headers
312
322
  };
313
- return transporter.request(request, requestOptions);
323
+ return this.transporter.request(request, requestOptions);
314
324
  },
315
325
  /**
316
326
  * Updates a QuerySuggestions configuration.
@@ -343,7 +353,7 @@ function createQuerySuggestionsClient({
343
353
  headers,
344
354
  data: configuration
345
355
  };
346
- return transporter.request(request, requestOptions);
356
+ return this.transporter.request(request, requestOptions);
347
357
  }
348
358
  };
349
359
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../builds/browser.ts","../../src/querySuggestionsClient.ts"],"sourcesContent":["// 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.\n\nimport type { ClientOptions } from '@algolia/client-common';\nimport {\n createMemoryCache,\n createFallbackableCache,\n createBrowserLocalStorageCache,\n DEFAULT_CONNECT_TIMEOUT_BROWSER,\n DEFAULT_READ_TIMEOUT_BROWSER,\n DEFAULT_WRITE_TIMEOUT_BROWSER,\n} from '@algolia/client-common';\nimport { createXhrRequester } from '@algolia/requester-browser-xhr';\n\nimport type { Region } from '../src/querySuggestionsClient';\nimport { createQuerySuggestionsClient, apiClientVersion, REGIONS } from '../src/querySuggestionsClient';\n\nexport { apiClientVersion, Region } from '../src/querySuggestionsClient';\nexport * from '../model';\n\n/**\n * The client type.\n */\nexport type QuerySuggestionsClient = ReturnType<typeof querySuggestionsClient>;\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport function querySuggestionsClient(appId: string, apiKey: string, region: Region, options?: ClientOptions) {\n if (!appId || typeof appId !== 'string') {\n throw new Error('`appId` is missing.');\n }\n\n if (!apiKey || typeof apiKey !== 'string') {\n throw new Error('`apiKey` is missing.');\n }\n\n if (!region || (region && (typeof region !== 'string' || !REGIONS.includes(region)))) {\n throw new Error(`\\`region\\` is required and must be one of the following: ${REGIONS.join(', ')}`);\n }\n\n return createQuerySuggestionsClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: DEFAULT_CONNECT_TIMEOUT_BROWSER,\n read: DEFAULT_READ_TIMEOUT_BROWSER,\n write: DEFAULT_WRITE_TIMEOUT_BROWSER,\n },\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: 'Browser' }],\n authMode: 'WithinQueryParameters',\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()],\n }),\n ...options,\n });\n}\n","// 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.\n\nimport { createAuth, createTransporter, getAlgoliaAgent } from '@algolia/client-common';\nimport type {\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\n\nimport type { BaseResponse } from '../model/baseResponse';\nimport type {\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeleteConfigProps,\n GetConfigProps,\n GetConfigStatusProps,\n GetLogFileProps,\n UpdateConfigProps,\n} from '../model/clientMethodProps';\nimport type { ConfigStatus } from '../model/configStatus';\nimport type { ConfigurationResponse } from '../model/configurationResponse';\nimport type { ConfigurationWithIndex } from '../model/configurationWithIndex';\nimport type { LogFile } from '../model/logFile';\n\nexport const apiClientVersion = '5.2.5';\n\nexport const REGIONS = ['eu', 'us'] as const;\nexport type Region = (typeof REGIONS)[number];\n\nfunction getDefaultHosts(region: Region): Host[] {\n const url = 'query-suggestions.{region}.algolia.com'.replace('{region}', region);\n\n return [{ url, accept: 'readWrite', protocol: 'https' }];\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport function createQuerySuggestionsClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}: CreateClientOptions & { region: Region }) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'QuerySuggestions',\n version: apiClientVersion,\n }),\n baseHeaders: {\n 'content-type': 'text/plain',\n ...auth.headers(),\n ...options.baseHeaders,\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters,\n },\n });\n\n return {\n transporter,\n\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache(): Promise<void> {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return transporter.algoliaAgent.value;\n },\n\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment: string, version?: string): void {\n transporter.algoliaAgent.add({ segment, version });\n },\n\n /**\n * Creates a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.\n *\n * Required API Key ACLs:\n * - editSettings.\n *\n * @param configurationWithIndex - The configurationWithIndex object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createConfig(\n configurationWithIndex: ConfigurationWithIndex,\n requestOptions?: RequestOptions,\n ): Promise<BaseResponse> {\n if (!configurationWithIndex) {\n throw new Error('Parameter `configurationWithIndex` is required when calling `createConfig`.');\n }\n\n const requestPath = '/1/configs';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: configurationWithIndex,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete(\n { path, parameters }: CustomDeleteProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customDelete`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'DELETE',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customGet`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost(\n { path, parameters, body }: CustomPostProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPost`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut(\n { path, parameters, body }: CustomPutProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPut`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'PUT',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * 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` operation.\n *\n * Required API Key ACLs:\n * - editSettings.\n *\n * @param deleteConfig - The deleteConfig object.\n * @param deleteConfig.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteConfig({ indexName }: DeleteConfigProps, requestOptions?: RequestOptions): Promise<BaseResponse> {\n if (!indexName) {\n throw new Error('Parameter `indexName` is required when calling `deleteConfig`.');\n }\n\n const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'DELETE',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves all Query Suggestions configurations of your Algolia application.\n *\n * Required API Key ACLs:\n * - settings.\n *\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAllConfigs(requestOptions?: RequestOptions): Promise<ConfigurationResponse[]> {\n const requestPath = '/1/configs';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves a single Query Suggestions configuration by its index name.\n *\n * Required API Key ACLs:\n * - settings.\n *\n * @param getConfig - The getConfig object.\n * @param getConfig.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getConfig({ indexName }: GetConfigProps, requestOptions?: RequestOptions): Promise<ConfigurationResponse> {\n if (!indexName) {\n throw new Error('Parameter `indexName` is required when calling `getConfig`.');\n }\n\n const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Reports the status of a Query Suggestions index.\n *\n * Required API Key ACLs:\n * - settings.\n *\n * @param getConfigStatus - The getConfigStatus object.\n * @param getConfigStatus.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getConfigStatus({ indexName }: GetConfigStatusProps, requestOptions?: RequestOptions): Promise<ConfigStatus> {\n if (!indexName) {\n throw new Error('Parameter `indexName` is required when calling `getConfigStatus`.');\n }\n\n const requestPath = '/1/configs/{indexName}/status'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the logs for a single Query Suggestions index.\n *\n * Required API Key ACLs:\n * - settings.\n *\n * @param getLogFile - The getLogFile object.\n * @param getLogFile.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getLogFile({ indexName }: GetLogFileProps, requestOptions?: RequestOptions): Promise<LogFile> {\n if (!indexName) {\n throw new Error('Parameter `indexName` is required when calling `getLogFile`.');\n }\n\n const requestPath = '/1/logs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Updates a QuerySuggestions configuration.\n *\n * Required API Key ACLs:\n * - editSettings.\n *\n * @param updateConfig - The updateConfig object.\n * @param updateConfig.indexName - Query Suggestions index name.\n * @param updateConfig.configuration - The configuration object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateConfig(\n { indexName, configuration }: UpdateConfigProps,\n requestOptions?: RequestOptions,\n ): Promise<BaseResponse> {\n if (!indexName) {\n throw new Error('Parameter `indexName` is required when calling `updateConfig`.');\n }\n\n if (!configuration) {\n throw new Error('Parameter `configuration` is required when calling `updateConfig`.');\n }\n\n if (!configuration.sourceIndices) {\n throw new Error('Parameter `configuration.sourceIndices` is required when calling `updateConfig`.');\n }\n\n const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'PUT',\n path: requestPath,\n queryParameters,\n headers,\n data: configuration,\n };\n\n return transporter.request(request, requestOptions);\n },\n };\n}\n"],"mappings":";AAGA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;;;ACTnC,SAAS,YAAY,mBAAmB,uBAAuB;AA2BxD,IAAM,mBAAmB;AAEzB,IAAM,UAAU,CAAC,MAAM,IAAI;AAGlC,SAAS,gBAAgB,QAAwB;AAC/C,QAAM,MAAM,yCAAyC,QAAQ,YAAY,MAAM;AAE/E,SAAO,CAAC,EAAE,KAAK,QAAQ,aAAa,UAAU,QAAQ,CAAC;AACzD;AAGO,SAAS,6BAA6B;AAAA,EAC3C,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,GAAG;AACL,GAA6C;AAC3C,QAAM,OAAO,WAAW,aAAa,cAAc,QAAQ;AAC3D,QAAM,cAAc,kBAAkB;AAAA,IACpC,OAAO,gBAAgB,YAAY;AAAA,IACnC,GAAG;AAAA,IACH,cAAc,gBAAgB;AAAA,MAC5B;AAAA,MACA,QAAQ;AAAA,MACR,SAAS;AAAA,IACX,CAAC;AAAA,IACD,aAAa;AAAA,MACX,gBAAgB;AAAA,MAChB,GAAG,KAAK,QAAQ;AAAA,MAChB,GAAG,QAAQ;AAAA,IACb;AAAA,IACA,qBAAqB;AAAA,MACnB,GAAG,KAAK,gBAAgB;AAAA,MACxB,GAAG,QAAQ;AAAA,IACb;AAAA,EACF,CAAC;AAED,SAAO;AAAA,IACL;AAAA;AAAA;AAAA;AAAA,IAKA,OAAO;AAAA;A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1C,YAAM,UAAmB;AAAA,QACvB,QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,MAAM;AAAA,MACR;AAEA,aAAO,YAAY,QAAQ,SAAS,cAAc;AAAA,IACpD;AAAA,EACF;AACF;;;AD1ZO,SAAS,uBAAuB,OAAe,QAAgB,QAAgB,SAAyB;AAC7G,MAAI,CAAC,SAAS,OAAO,UAAU,UAAU;AACvC,UAAM,IAAI,MAAM,qBAAqB;AAAA,EACvC;AAEA,MAAI,CAAC,UAAU,OAAO,WAAW,UAAU;AACzC,UAAM,IAAI,MAAM,sBAAsB;AAAA,EACxC;AAEA,MAAI,CAAC,UAAW,WAAW,OAAO,WAAW,YAAY,CAAC,QAAQ,SAAS,MAAM,IAAK;AACpF,UAAM,IAAI,MAAM,4DAA4D,QAAQ,KAAK,IAAI,CAAC,EAAE;AAAA,EAClG;AAEA,SAAO,6BAA6B;AAAA,IAClC;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,MACR,SAAS;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,IACT;AAAA,IACA,WAAW,mBAAmB;AAAA,IAC9B,eAAe,CAAC,EAAE,SAAS,UAAU,CAAC;AAAA,IACtC,UAAU;AAAA,IACV,gBAAgB,kBAAkB;AAAA,IAClC,eAAe,kBAAkB,EAAE,cAAc,MAAM,CAAC;AAAA,IACxD,YAAY,wBAAwB;AAAA,MAClC,QAAQ,CAAC,+BAA+B,EAAE,KAAK,GAAG,gBAAgB,IAAI,KAAK,GAAG,CAAC,GAAG,kBAAkB,CAAC;AAAA,IACvG,CAAC;AAAA,IACD,GAAG;AAAA,EACL,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../../builds/browser.ts","../../src/querySuggestionsClient.ts"],"sourcesContent":["// 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.\n\nimport type { ClientOptions } from '@algolia/client-common';\nimport {\n createMemoryCache,\n createFallbackableCache,\n createBrowserLocalStorageCache,\n DEFAULT_CONNECT_TIMEOUT_BROWSER,\n DEFAULT_READ_TIMEOUT_BROWSER,\n DEFAULT_WRITE_TIMEOUT_BROWSER,\n} from '@algolia/client-common';\nimport { createXhrRequester } from '@algolia/requester-browser-xhr';\n\nimport type { Region } from '../src/querySuggestionsClient';\nimport { createQuerySuggestionsClient, apiClientVersion, REGIONS } from '../src/querySuggestionsClient';\n\nexport type QuerySuggestionsClient = ReturnType<typeof createQuerySuggestionsClient>;\n\nexport { apiClientVersion, Region } from '../src/querySuggestionsClient';\nexport * from '../model';\n\nexport function querySuggestionsClient(\n appId: string,\n apiKey: string,\n region: Region,\n options?: ClientOptions,\n): QuerySuggestionsClient {\n if (!appId || typeof appId !== 'string') {\n throw new Error('`appId` is missing.');\n }\n\n if (!apiKey || typeof apiKey !== 'string') {\n throw new Error('`apiKey` is missing.');\n }\n\n if (!region || (region && (typeof region !== 'string' || !REGIONS.includes(region)))) {\n throw new Error(`\\`region\\` is required and must be one of the following: ${REGIONS.join(', ')}`);\n }\n\n return createQuerySuggestionsClient({\n appId,\n apiKey,\n region,\n timeouts: {\n connect: DEFAULT_CONNECT_TIMEOUT_BROWSER,\n read: DEFAULT_READ_TIMEOUT_BROWSER,\n write: DEFAULT_WRITE_TIMEOUT_BROWSER,\n },\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: 'Browser' }],\n authMode: 'WithinQueryParameters',\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()],\n }),\n ...options,\n });\n}\n","// 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.\n\nimport { createAuth, createTransporter, getAlgoliaAgent } from '@algolia/client-common';\nimport type {\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\n\nimport type { BaseResponse } from '../model/baseResponse';\nimport type {\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeleteConfigProps,\n GetConfigProps,\n GetConfigStatusProps,\n GetLogFileProps,\n UpdateConfigProps,\n} from '../model/clientMethodProps';\nimport type { ConfigStatus } from '../model/configStatus';\nimport type { ConfigurationResponse } from '../model/configurationResponse';\nimport type { ConfigurationWithIndex } from '../model/configurationWithIndex';\nimport type { LogFile } from '../model/logFile';\n\nexport const apiClientVersion = '5.3.0';\n\nexport const REGIONS = ['eu', 'us'] as const;\nexport type Region = (typeof REGIONS)[number];\n\nfunction getDefaultHosts(region: Region): Host[] {\n const url = 'query-suggestions.{region}.algolia.com'.replace('{region}', region);\n\n return [{ url, accept: 'readWrite', protocol: 'https' }];\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport function createQuerySuggestionsClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n region: regionOption,\n ...options\n}: CreateClientOptions & { region: Region }) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n\n return {\n transporter: createTransporter({\n hosts: getDefaultHosts(regionOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'QuerySuggestions',\n version: apiClientVersion,\n }),\n baseHeaders: {\n 'content-type': 'text/plain',\n ...auth.headers(),\n ...options.baseHeaders,\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters,\n },\n }),\n\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache(): Promise<void> {\n return Promise.all([this.transporter.requestsCache.clear(), this.transporter.responsesCache.clear()]).then(\n () => undefined,\n );\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return this.transporter.algoliaAgent.value;\n },\n\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment: string, version?: string): void {\n this.transporter.algoliaAgent.add({ segment, version });\n },\n\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }: { apiKey: string }): void {\n this.transporter.baseHeaders['x-algolia-api-key'] = apiKey;\n },\n\n /**\n * Creates a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.\n *\n * Required API Key ACLs:\n * - editSettings.\n *\n * @param configurationWithIndex - The configurationWithIndex object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n createConfig(\n configurationWithIndex: ConfigurationWithIndex,\n requestOptions?: RequestOptions,\n ): Promise<BaseResponse> {\n if (!configurationWithIndex) {\n throw new Error('Parameter `configurationWithIndex` is required when calling `createConfig`.');\n }\n\n const requestPath = '/1/configs';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: configurationWithIndex,\n };\n\n return this.transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customDelete.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customDelete(\n { path, parameters }: CustomDeleteProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customDelete`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'DELETE',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return this.transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customGet.parameters - Query parameters to apply to the current query.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customGet`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return this.transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost(\n { path, parameters, body }: CustomPostProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPost`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return this.transporter.request(request, requestOptions);\n },\n\n /**\n * This method allow you to send requests to the Algolia REST API.\n *\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPut.parameters - Query parameters to apply to the current query.\n * @param customPut.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPut(\n { path, parameters, body }: CustomPutProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPut`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'PUT',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return this.transporter.request(request, requestOptions);\n },\n\n /**\n * 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` operation.\n *\n * Required API Key ACLs:\n * - editSettings.\n *\n * @param deleteConfig - The deleteConfig object.\n * @param deleteConfig.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteConfig({ indexName }: DeleteConfigProps, requestOptions?: RequestOptions): Promise<BaseResponse> {\n if (!indexName) {\n throw new Error('Parameter `indexName` is required when calling `deleteConfig`.');\n }\n\n const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'DELETE',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return this.transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves all Query Suggestions configurations of your Algolia application.\n *\n * Required API Key ACLs:\n * - settings.\n *\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getAllConfigs(requestOptions?: RequestOptions): Promise<ConfigurationResponse[]> {\n const requestPath = '/1/configs';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return this.transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves a single Query Suggestions configuration by its index name.\n *\n * Required API Key ACLs:\n * - settings.\n *\n * @param getConfig - The getConfig object.\n * @param getConfig.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getConfig({ indexName }: GetConfigProps, requestOptions?: RequestOptions): Promise<ConfigurationResponse> {\n if (!indexName) {\n throw new Error('Parameter `indexName` is required when calling `getConfig`.');\n }\n\n const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return this.transporter.request(request, requestOptions);\n },\n\n /**\n * Reports the status of a Query Suggestions index.\n *\n * Required API Key ACLs:\n * - settings.\n *\n * @param getConfigStatus - The getConfigStatus object.\n * @param getConfigStatus.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getConfigStatus({ indexName }: GetConfigStatusProps, requestOptions?: RequestOptions): Promise<ConfigStatus> {\n if (!indexName) {\n throw new Error('Parameter `indexName` is required when calling `getConfigStatus`.');\n }\n\n const requestPath = '/1/configs/{indexName}/status'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return this.transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves the logs for a single Query Suggestions index.\n *\n * Required API Key ACLs:\n * - settings.\n *\n * @param getLogFile - The getLogFile object.\n * @param getLogFile.indexName - Query Suggestions index name.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getLogFile({ indexName }: GetLogFileProps, requestOptions?: RequestOptions): Promise<LogFile> {\n if (!indexName) {\n throw new Error('Parameter `indexName` is required when calling `getLogFile`.');\n }\n\n const requestPath = '/1/logs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'GET',\n path: requestPath,\n queryParameters,\n headers,\n };\n\n return this.transporter.request(request, requestOptions);\n },\n\n /**\n * Updates a QuerySuggestions configuration.\n *\n * Required API Key ACLs:\n * - editSettings.\n *\n * @param updateConfig - The updateConfig object.\n * @param updateConfig.indexName - Query Suggestions index name.\n * @param updateConfig.configuration - The configuration object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n updateConfig(\n { indexName, configuration }: UpdateConfigProps,\n requestOptions?: RequestOptions,\n ): Promise<BaseResponse> {\n if (!indexName) {\n throw new Error('Parameter `indexName` is required when calling `updateConfig`.');\n }\n\n if (!configuration) {\n throw new Error('Parameter `configuration` is required when calling `updateConfig`.');\n }\n\n if (!configuration.sourceIndices) {\n throw new Error('Parameter `configuration.sourceIndices` is required when calling `updateConfig`.');\n }\n\n const requestPath = '/1/configs/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'PUT',\n path: requestPath,\n queryParameters,\n headers,\n data: configuration,\n };\n\n return this.transporter.request(request, requestOptions);\n },\n };\n}\n"],"mappings":";AAGA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;;;ACTnC,SAAS,YAAY,mBAAmB,uBAAuB;AA2BxD,IAAM,mBAAmB;AAEzB,IAAM,UAAU,CAAC,MAAM,IAAI;AAGlC,SAAS,gBAAgB,QAAwB;AAC/C,QAAM,MAAM,yCAAyC,QAAQ,YAAY,MAAM;AAE/E,SAAO,CAAC,EAAE,KAAK,QAAQ,aAAa,UAAU,QAAQ,CAAC;AACzD;AAGO,SAAS,6BAA6B;AAAA,EAC3C,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,GAAG;AACL,GAA6C;AAC3C,QAAM,OAAO,WAAW,aAAa,cAAc,QAAQ;AAE3D,SAAO;AAAA,IACL,aAAa,kBAAkB;AAAA,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