@algolia/client-query-suggestions 5.2.3 → 5.2.4-beta.3
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 +282 -0
- package/dist/builds/browser.js +386 -0
- package/dist/builds/browser.js.map +1 -0
- package/dist/builds/browser.min.js +2 -0
- package/dist/builds/browser.min.js.map +1 -0
- package/dist/builds/browser.umd.js +12 -0
- package/dist/builds/node.cjs +404 -0
- package/dist/builds/node.cjs.map +1 -0
- package/dist/builds/node.js +384 -0
- package/dist/builds/node.js.map +1 -0
- package/dist/model/appID.cjs +19 -0
- package/dist/model/appID.cjs.map +1 -0
- package/dist/model/appID.js +1 -0
- package/dist/model/appID.js.map +1 -0
- package/dist/model/baseResponse.cjs +19 -0
- package/dist/model/baseResponse.cjs.map +1 -0
- package/dist/model/baseResponse.js +1 -0
- package/dist/model/baseResponse.js.map +1 -0
- package/dist/model/clientMethodProps.cjs +19 -0
- package/dist/model/clientMethodProps.cjs.map +1 -0
- package/dist/model/clientMethodProps.js +1 -0
- package/dist/model/clientMethodProps.js.map +1 -0
- package/dist/model/configStatus.cjs +19 -0
- package/dist/model/configStatus.cjs.map +1 -0
- package/dist/model/configStatus.js +1 -0
- package/dist/model/configStatus.js.map +1 -0
- package/dist/model/configuration.cjs +19 -0
- package/dist/model/configuration.cjs.map +1 -0
- package/dist/model/configuration.js +1 -0
- package/dist/model/configuration.js.map +1 -0
- package/dist/model/configurationResponse.cjs +19 -0
- package/dist/model/configurationResponse.cjs.map +1 -0
- package/dist/model/configurationResponse.js +1 -0
- package/dist/model/configurationResponse.js.map +1 -0
- package/dist/model/configurationWithIndex.cjs +19 -0
- package/dist/model/configurationWithIndex.cjs.map +1 -0
- package/dist/model/configurationWithIndex.js +1 -0
- package/dist/model/configurationWithIndex.js.map +1 -0
- package/dist/model/errorBase.cjs +19 -0
- package/dist/model/errorBase.cjs.map +1 -0
- package/dist/model/errorBase.js +1 -0
- package/dist/model/errorBase.js.map +1 -0
- package/dist/model/facet.cjs +19 -0
- package/dist/model/facet.cjs.map +1 -0
- package/dist/model/facet.js +1 -0
- package/dist/model/facet.js.map +1 -0
- package/dist/model/index.cjs +19 -0
- package/dist/model/index.cjs.map +1 -0
- package/dist/model/index.js +1 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model/languages.cjs +19 -0
- package/dist/model/languages.cjs.map +1 -0
- package/dist/model/languages.js +1 -0
- package/dist/model/languages.js.map +1 -0
- package/dist/model/logFile.cjs +19 -0
- package/dist/model/logFile.cjs.map +1 -0
- package/dist/model/logFile.js +1 -0
- package/dist/model/logFile.js.map +1 -0
- package/dist/model/logLevel.cjs +19 -0
- package/dist/model/logLevel.cjs.map +1 -0
- package/dist/model/logLevel.js +1 -0
- package/dist/model/logLevel.js.map +1 -0
- package/dist/model/sourceIndex.cjs +19 -0
- package/dist/model/sourceIndex.cjs.map +1 -0
- package/dist/model/sourceIndex.js +1 -0
- package/dist/model/sourceIndex.js.map +1 -0
- package/dist/node.d.cts +282 -0
- package/dist/node.d.ts +282 -0
- package/dist/src/querySuggestionsClient.cjs +371 -0
- package/dist/src/querySuggestionsClient.cjs.map +1 -0
- package/dist/src/querySuggestionsClient.js +344 -0
- package/dist/src/querySuggestionsClient.js.map +1 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +33 -30
- package/dist/builds/browser.d.ts +0 -27
- package/dist/builds/browser.d.ts.map +0 -1
- package/dist/builds/node.d.ts +0 -27
- package/dist/builds/node.d.ts.map +0 -1
- package/dist/client-query-suggestions.cjs +0 -371
- package/dist/client-query-suggestions.esm.browser.js +0 -1045
- package/dist/client-query-suggestions.esm.node.js +0 -368
- package/dist/client-query-suggestions.umd.js +0 -2
- package/dist/model/appID.d.ts +0 -7
- package/dist/model/appID.d.ts.map +0 -1
- package/dist/model/baseResponse.d.ts +0 -11
- package/dist/model/baseResponse.d.ts.map +0 -1
- package/dist/model/clientMethodProps.d.ts +0 -108
- package/dist/model/clientMethodProps.d.ts.map +0 -1
- package/dist/model/configStatus.d.ts +0 -23
- package/dist/model/configStatus.d.ts.map +0 -1
- package/dist/model/configuration.d.ts +0 -22
- package/dist/model/configuration.d.ts.map +0 -1
- package/dist/model/configurationResponse.d.ts +0 -7
- package/dist/model/configurationResponse.d.ts.map +0 -1
- package/dist/model/configurationWithIndex.d.ts +0 -6
- package/dist/model/configurationWithIndex.d.ts.map +0 -1
- package/dist/model/errorBase.d.ts +0 -7
- package/dist/model/errorBase.d.ts.map +0 -1
- package/dist/model/facet.d.ts +0 -14
- package/dist/model/facet.d.ts.map +0 -1
- package/dist/model/index.d.ts +0 -14
- package/dist/model/index.d.ts.map +0 -1
- package/dist/model/languages.d.ts +0 -5
- package/dist/model/languages.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/logLevel.d.ts +0 -5
- package/dist/model/logLevel.d.ts.map +0 -1
- package/dist/model/sourceIndex.d.ts +0 -27
- package/dist/model/sourceIndex.d.ts.map +0 -1
- package/dist/src/querySuggestionsClient.d.ts +0 -148
- package/dist/src/querySuggestionsClient.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../model/configurationWithIndex.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 { Configuration } from './configuration';\n\n/**\n * Query Suggestions configuration.\n */\nexport type ConfigurationWithIndex = Configuration & Record<string, unknown>;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=configurationWithIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// model/errorBase.ts
|
|
17
|
+
var errorBase_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(errorBase_exports);
|
|
19
|
+
//# sourceMappingURL=errorBase.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../model/errorBase.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\n/**\n * Error.\n */\nexport type ErrorBase = Record<string, any> & {\n message?: string;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=errorBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// model/facet.ts
|
|
17
|
+
var facet_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(facet_exports);
|
|
19
|
+
//# sourceMappingURL=facet.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../model/facet.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\n/**\n * Facet to use as category.\n */\nexport type Facet = {\n /**\n * Facet name.\n */\n attribute?: string;\n\n /**\n * Number of suggestions.\n */\n amount?: number;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=facet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// model/index.ts
|
|
17
|
+
var model_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(model_exports);
|
|
19
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../model/index.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\nexport * from './appID';\nexport * from './baseResponse';\nexport * from './configStatus';\nexport * from './configuration';\nexport * from './configurationResponse';\nexport * from './configurationWithIndex';\nexport * from './errorBase';\nexport * from './facet';\nexport * from './languages';\nexport * from './logFile';\nexport * from './logLevel';\nexport * from './sourceIndex';\nexport * from './clientMethodProps';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// model/languages.ts
|
|
17
|
+
var languages_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(languages_exports);
|
|
19
|
+
//# sourceMappingURL=languages.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../model/languages.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\n/**\n * Languages for deduplicating singular and plural suggestions. If specified, only the more popular form is included.\n */\nexport type Languages = string[] | boolean;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=languages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// model/logFile.ts
|
|
17
|
+
var logFile_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(logFile_exports);
|
|
19
|
+
//# sourceMappingURL=logFile.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../model/logFile.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 { LogLevel } from './logLevel';\n\nexport type LogFile = {\n /**\n * Date and time of the log entry, in RFC 3339 format.\n */\n timestamp?: string;\n\n level?: LogLevel;\n\n /**\n * Details about this log entry.\n */\n message?: string;\n\n /**\n * 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.\n */\n contextLevel?: number;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=logFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// model/logLevel.ts
|
|
17
|
+
var logLevel_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(logLevel_exports);
|
|
19
|
+
//# sourceMappingURL=logLevel.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../model/logLevel.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\n/**\n * 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.\n */\nexport type LogLevel = 'ERROR' | 'INFO' | 'SKIP';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=logLevel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// model/sourceIndex.ts
|
|
17
|
+
var sourceIndex_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(sourceIndex_exports);
|
|
19
|
+
//# sourceMappingURL=sourceIndex.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../model/sourceIndex.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 { Facet } from './facet';\n\n/**\n * Configuration of an Algolia index for Query Suggestions.\n */\nexport type SourceIndex = {\n /**\n * Name of the Algolia index (case-sensitive) to use as source for query suggestions.\n */\n indexName: string;\n\n /**\n * If true, Query Suggestions uses all replica indices to find popular searches. If false, only the primary index is used.\n */\n replicas?: boolean;\n\n analyticsTags?: string[] | null;\n\n facets?: Facet[] | null;\n\n /**\n * Minimum number of hits required to be included as a suggestion. A search query must at least generate `minHits` search results to be included in the Query Suggestions index.\n */\n minHits?: number;\n\n /**\n * Minimum letters required to be included as a suggestion. A search query must be at least `minLetters` long to be included in the Query Suggestions index.\n */\n minLetters?: number;\n\n generate?: string[][] | null;\n\n external?: string[] | null;\n};\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=sourceIndex.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/node.d.cts
ADDED
|
@@ -0,0 +1,282 @@
|
|
|
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
|
+
};
|
|
10
|
+
|
|
11
|
+
type BaseResponse = {
|
|
12
|
+
/**
|
|
13
|
+
* HTTP status code.
|
|
14
|
+
*/
|
|
15
|
+
status?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Details about the response, such as error messages.
|
|
18
|
+
*/
|
|
19
|
+
message?: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
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
|
+
/**
|
|
46
|
+
* Languages for deduplicating singular and plural suggestions. If specified, only the more popular form is included.
|
|
47
|
+
*/
|
|
48
|
+
type Languages = string[] | boolean;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Facet to use as category.
|
|
52
|
+
*/
|
|
53
|
+
type Facet = {
|
|
54
|
+
/**
|
|
55
|
+
* Facet name.
|
|
56
|
+
*/
|
|
57
|
+
attribute?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Number of suggestions.
|
|
60
|
+
*/
|
|
61
|
+
amount?: number;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Configuration of an Algolia index for Query Suggestions.
|
|
66
|
+
*/
|
|
67
|
+
type SourceIndex = {
|
|
68
|
+
/**
|
|
69
|
+
* Name of the Algolia index (case-sensitive) to use as source for query suggestions.
|
|
70
|
+
*/
|
|
71
|
+
indexName: string;
|
|
72
|
+
/**
|
|
73
|
+
* If true, Query Suggestions uses all replica indices to find popular searches. If false, only the primary index is used.
|
|
74
|
+
*/
|
|
75
|
+
replicas?: boolean;
|
|
76
|
+
analyticsTags?: string[] | null;
|
|
77
|
+
facets?: Facet[] | null;
|
|
78
|
+
/**
|
|
79
|
+
* Minimum number of hits required to be included as a suggestion. A search query must at least generate `minHits` search results to be included in the Query Suggestions index.
|
|
80
|
+
*/
|
|
81
|
+
minHits?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Minimum letters required to be included as a suggestion. A search query must be at least `minLetters` long to be included in the Query Suggestions index.
|
|
84
|
+
*/
|
|
85
|
+
minLetters?: number;
|
|
86
|
+
generate?: string[][] | null;
|
|
87
|
+
external?: string[] | null;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Query Suggestions configuration.
|
|
92
|
+
*/
|
|
93
|
+
type Configuration = {
|
|
94
|
+
/**
|
|
95
|
+
* Algolia indices from which to get the popular searches for query suggestions.
|
|
96
|
+
*/
|
|
97
|
+
sourceIndices: SourceIndex[];
|
|
98
|
+
languages?: Languages;
|
|
99
|
+
exclude?: string[] | null;
|
|
100
|
+
/**
|
|
101
|
+
* Whether to turn on personalized query suggestions.
|
|
102
|
+
*/
|
|
103
|
+
enablePersonalization?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Whether to include suggestions with special characters.
|
|
106
|
+
*/
|
|
107
|
+
allowSpecialCharacters?: boolean;
|
|
108
|
+
};
|
|
109
|
+
|
|
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
|
+
/**
|
|
149
|
+
* Properties for the `customDelete` method.
|
|
150
|
+
*/
|
|
151
|
+
type CustomDeleteProps = {
|
|
152
|
+
/**
|
|
153
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
154
|
+
*/
|
|
155
|
+
path: string;
|
|
156
|
+
/**
|
|
157
|
+
* Query parameters to apply to the current query.
|
|
158
|
+
*/
|
|
159
|
+
parameters?: Record<string, any>;
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Properties for the `customGet` method.
|
|
163
|
+
*/
|
|
164
|
+
type CustomGetProps = {
|
|
165
|
+
/**
|
|
166
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
167
|
+
*/
|
|
168
|
+
path: string;
|
|
169
|
+
/**
|
|
170
|
+
* Query parameters to apply to the current query.
|
|
171
|
+
*/
|
|
172
|
+
parameters?: Record<string, any>;
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Properties for the `customPost` method.
|
|
176
|
+
*/
|
|
177
|
+
type CustomPostProps = {
|
|
178
|
+
/**
|
|
179
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
180
|
+
*/
|
|
181
|
+
path: string;
|
|
182
|
+
/**
|
|
183
|
+
* Query parameters to apply to the current query.
|
|
184
|
+
*/
|
|
185
|
+
parameters?: Record<string, any>;
|
|
186
|
+
/**
|
|
187
|
+
* Parameters to send with the custom request.
|
|
188
|
+
*/
|
|
189
|
+
body?: Record<string, unknown>;
|
|
190
|
+
};
|
|
191
|
+
/**
|
|
192
|
+
* Properties for the `customPut` method.
|
|
193
|
+
*/
|
|
194
|
+
type CustomPutProps = {
|
|
195
|
+
/**
|
|
196
|
+
* Path of the endpoint, anything after \"/1\" must be specified.
|
|
197
|
+
*/
|
|
198
|
+
path: string;
|
|
199
|
+
/**
|
|
200
|
+
* Query parameters to apply to the current query.
|
|
201
|
+
*/
|
|
202
|
+
parameters?: Record<string, any>;
|
|
203
|
+
/**
|
|
204
|
+
* Parameters to send with the custom request.
|
|
205
|
+
*/
|
|
206
|
+
body?: Record<string, unknown>;
|
|
207
|
+
};
|
|
208
|
+
/**
|
|
209
|
+
* Properties for the `deleteConfig` method.
|
|
210
|
+
*/
|
|
211
|
+
type DeleteConfigProps = {
|
|
212
|
+
/**
|
|
213
|
+
* Query Suggestions index name.
|
|
214
|
+
*/
|
|
215
|
+
indexName: string;
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* Properties for the `getConfig` method.
|
|
219
|
+
*/
|
|
220
|
+
type GetConfigProps = {
|
|
221
|
+
/**
|
|
222
|
+
* Query Suggestions index name.
|
|
223
|
+
*/
|
|
224
|
+
indexName: string;
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* Properties for the `getConfigStatus` method.
|
|
228
|
+
*/
|
|
229
|
+
type GetConfigStatusProps = {
|
|
230
|
+
/**
|
|
231
|
+
* Query Suggestions index name.
|
|
232
|
+
*/
|
|
233
|
+
indexName: string;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* Properties for the `getLogFile` method.
|
|
237
|
+
*/
|
|
238
|
+
type GetLogFileProps = {
|
|
239
|
+
/**
|
|
240
|
+
* Query Suggestions index name.
|
|
241
|
+
*/
|
|
242
|
+
indexName: string;
|
|
243
|
+
};
|
|
244
|
+
/**
|
|
245
|
+
* Properties for the `updateConfig` method.
|
|
246
|
+
*/
|
|
247
|
+
type UpdateConfigProps = {
|
|
248
|
+
/**
|
|
249
|
+
* Query Suggestions index name.
|
|
250
|
+
*/
|
|
251
|
+
indexName: string;
|
|
252
|
+
configuration: Configuration;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
declare const apiClientVersion = "5.2.4";
|
|
256
|
+
declare const REGIONS: readonly ["eu", "us"];
|
|
257
|
+
type Region = (typeof REGIONS)[number];
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* The client type.
|
|
261
|
+
*/
|
|
262
|
+
type QuerySuggestionsClient = ReturnType<typeof querySuggestionsClient>;
|
|
263
|
+
declare function querySuggestionsClient(appId: string, apiKey: string, region: Region, options?: ClientOptions): {
|
|
264
|
+
transporter: _algolia_client_common.Transporter;
|
|
265
|
+
appId: string;
|
|
266
|
+
clearCache(): Promise<void>;
|
|
267
|
+
_ua: string;
|
|
268
|
+
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>;
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
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 };
|