@algolia/client-query-suggestions 5.0.0-alpha.99 → 5.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/builds/browser.d.ts +24 -3
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +24 -3
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-query-suggestions.cjs +64 -51
- package/dist/client-query-suggestions.esm.browser.js +60 -59
- package/dist/client-query-suggestions.esm.node.js +64 -51
- package/dist/client-query-suggestions.umd.js +2 -2
- package/dist/model/appID.d.ts +7 -0
- package/dist/model/appID.d.ts.map +1 -0
- package/dist/model/clientMethodProps.d.ts +2 -2
- package/dist/model/clientMethodProps.d.ts.map +1 -1
- package/dist/model/{querySuggestionsConfiguration.d.ts → configuration.d.ts} +4 -7
- package/dist/model/configuration.d.ts.map +1 -0
- package/dist/model/configurationResponse.d.ts +7 -0
- package/dist/model/configurationResponse.d.ts.map +1 -0
- package/dist/model/configurationWithIndex.d.ts +6 -0
- package/dist/model/configurationWithIndex.d.ts.map +1 -0
- package/dist/model/getConfigStatus200Response.d.ts +4 -4
- package/dist/model/getLogFile200Response.d.ts +2 -2
- package/dist/model/index.d.ts +4 -5
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/languages.d.ts +1 -1
- package/dist/model/logLevel.d.ts +1 -1
- package/dist/model/sourceIndex.d.ts +4 -13
- package/dist/model/sourceIndex.d.ts.map +1 -1
- package/dist/src/querySuggestionsClient.d.ts +37 -31
- package/dist/src/querySuggestionsClient.d.ts.map +1 -1
- package/model/{baseQuerySuggestionsConfigurationWithIndex.ts → appID.ts} +3 -3
- package/model/clientMethodProps.ts +2 -2
- package/model/{querySuggestionsConfiguration.ts → configuration.ts} +3 -6
- package/model/configurationResponse.ts +9 -0
- package/model/configurationWithIndex.ts +8 -0
- package/model/getConfigStatus200Response.ts +4 -4
- package/model/getLogFile200Response.ts +2 -2
- package/model/index.ts +4 -5
- package/model/languages.ts +1 -1
- package/model/logLevel.ts +1 -1
- package/model/sourceIndex.ts +4 -13
- package/package.json +11 -8
- package/dist/model/baseQuerySuggestionsConfigurationResponse.d.ts +0 -19
- package/dist/model/baseQuerySuggestionsConfigurationResponse.d.ts.map +0 -1
- package/dist/model/baseQuerySuggestionsConfigurationWithIndex.d.ts +0 -7
- package/dist/model/baseQuerySuggestionsConfigurationWithIndex.d.ts.map +0 -1
- package/dist/model/querySuggestionsConfiguration.d.ts.map +0 -1
- package/dist/model/querySuggestionsConfigurationResponse.d.ts +0 -4
- package/dist/model/querySuggestionsConfigurationResponse.d.ts.map +0 -1
- package/dist/model/querySuggestionsConfigurationWithIndex.d.ts +0 -7
- package/dist/model/querySuggestionsConfigurationWithIndex.d.ts.map +0 -1
- package/model/baseQuerySuggestionsConfigurationResponse.ts +0 -23
- package/model/querySuggestionsConfigurationResponse.ts +0 -8
- package/model/querySuggestionsConfigurationWithIndex.ts +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appID.d.ts","sourceRoot":"","sources":["../../model/appID.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,KAAK,GAAG;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Configuration } from './configuration';
|
|
2
2
|
/**
|
|
3
3
|
* Properties for the `customDelete` method.
|
|
4
4
|
*/
|
|
@@ -103,6 +103,6 @@ export type UpdateConfigProps = {
|
|
|
103
103
|
* Query Suggestions index name.
|
|
104
104
|
*/
|
|
105
105
|
indexName: string;
|
|
106
|
-
|
|
106
|
+
configuration: Configuration;
|
|
107
107
|
};
|
|
108
108
|
//# sourceMappingURL=clientMethodProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,aAAa,CAAC;CAC9B,CAAC"}
|
|
@@ -3,23 +3,20 @@ import type { SourceIndex } from './sourceIndex';
|
|
|
3
3
|
/**
|
|
4
4
|
* Query Suggestions configuration.
|
|
5
5
|
*/
|
|
6
|
-
export type
|
|
6
|
+
export type Configuration = {
|
|
7
7
|
/**
|
|
8
8
|
* Algolia indices from which to get the popular searches for query suggestions.
|
|
9
9
|
*/
|
|
10
10
|
sourceIndices: SourceIndex[];
|
|
11
11
|
languages?: Languages;
|
|
12
|
-
/**
|
|
13
|
-
* Patterns to exclude from query suggestions.
|
|
14
|
-
*/
|
|
15
12
|
exclude?: string[] | null;
|
|
16
13
|
/**
|
|
17
|
-
*
|
|
14
|
+
* Whether to turn on personalized query suggestions.
|
|
18
15
|
*/
|
|
19
16
|
enablePersonalization?: boolean;
|
|
20
17
|
/**
|
|
21
|
-
*
|
|
18
|
+
* Whether to include suggestions with special characters.
|
|
22
19
|
*/
|
|
23
20
|
allowSpecialCharacters?: boolean;
|
|
24
21
|
};
|
|
25
|
-
//# sourceMappingURL=
|
|
22
|
+
//# sourceMappingURL=configuration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../../model/configuration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,aAAa,EAAE,WAAW,EAAE,CAAC;IAE7B,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AppID } from './appID';
|
|
2
|
+
import type { ConfigurationWithIndex } from './configurationWithIndex';
|
|
3
|
+
/**
|
|
4
|
+
* API response for retrieving Query Suggestions configurations.
|
|
5
|
+
*/
|
|
6
|
+
export type ConfigurationResponse = AppID & ConfigurationWithIndex;
|
|
7
|
+
//# sourceMappingURL=configurationResponse.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurationResponse.d.ts","sourceRoot":"","sources":["../../model/configurationResponse.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurationWithIndex.d.ts","sourceRoot":"","sources":["../../model/configurationWithIndex.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
export type GetConfigStatus200Response = {
|
|
2
2
|
/**
|
|
3
|
-
* Query Suggestions index
|
|
3
|
+
* Name of the Query Suggestions index (case-sensitive).
|
|
4
4
|
*/
|
|
5
5
|
indexName?: string;
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Whether the creation or update of the Query Suggestions index is in progress.
|
|
8
8
|
*/
|
|
9
9
|
isRunning?: boolean;
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Date and time when the Query Suggestions index was last built, in RFC 3339 format.
|
|
12
12
|
*/
|
|
13
13
|
lastBuiltAt?: string;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Date and time when the Query Suggestions index was last updated successfully.
|
|
16
16
|
*/
|
|
17
17
|
lastSuccessfulBuiltAt?: string;
|
|
18
18
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { LogLevel } from './logLevel';
|
|
2
2
|
export type GetLogFile200Response = {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Date and time of the log entry, in RFC 3339 format.
|
|
5
5
|
*/
|
|
6
6
|
timestamp?: string;
|
|
7
7
|
level?: LogLevel;
|
|
@@ -10,7 +10,7 @@ export type GetLogFile200Response = {
|
|
|
10
10
|
*/
|
|
11
11
|
message?: string;
|
|
12
12
|
/**
|
|
13
|
-
* Level indicating the position of a suggestion in a hierarchy of records.
|
|
13
|
+
* 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.
|
|
14
14
|
*/
|
|
15
15
|
contextLevel?: number;
|
|
16
16
|
};
|
package/dist/model/index.d.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './baseQuerySuggestionsConfigurationWithIndex';
|
|
1
|
+
export * from './appID';
|
|
3
2
|
export * from './baseResponse';
|
|
3
|
+
export * from './configuration';
|
|
4
|
+
export * from './configurationResponse';
|
|
5
|
+
export * from './configurationWithIndex';
|
|
4
6
|
export * from './errorBase';
|
|
5
7
|
export * from './facet';
|
|
6
8
|
export * from './getConfigStatus200Response';
|
|
7
9
|
export * from './getLogFile200Response';
|
|
8
10
|
export * from './languages';
|
|
9
11
|
export * from './logLevel';
|
|
10
|
-
export * from './querySuggestionsConfiguration';
|
|
11
|
-
export * from './querySuggestionsConfigurationResponse';
|
|
12
|
-
export * from './querySuggestionsConfigurationWithIndex';
|
|
13
12
|
export * from './sourceIndex';
|
|
14
13
|
export * from './clientMethodProps';
|
|
15
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":"AAEA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../model/index.ts"],"names":[],"mappings":"AAEA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Languages for deduplicating singular and plural suggestions. If specified, only the more popular form is included.
|
|
3
3
|
*/
|
|
4
4
|
export type Languages = string[] | boolean;
|
|
5
5
|
//# sourceMappingURL=languages.d.ts.map
|
package/dist/model/logLevel.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* 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.
|
|
3
3
|
*/
|
|
4
4
|
export type LogLevel = 'ERROR' | 'INFO' | 'SKIP';
|
|
5
5
|
//# sourceMappingURL=logLevel.d.ts.map
|
|
@@ -4,33 +4,24 @@ import type { Facet } from './facet';
|
|
|
4
4
|
*/
|
|
5
5
|
export type SourceIndex = {
|
|
6
6
|
/**
|
|
7
|
-
* Name of the Algolia index to use as source for query suggestions.
|
|
7
|
+
* Name of the Algolia index (case-sensitive) to use as source for query suggestions.
|
|
8
8
|
*/
|
|
9
9
|
indexName: string;
|
|
10
10
|
/**
|
|
11
|
-
* If true, Query Suggestions uses all
|
|
11
|
+
* If true, Query Suggestions uses all replica indices to find popular searches. If false, only the primary index is used.
|
|
12
12
|
*/
|
|
13
13
|
replicas?: boolean;
|
|
14
|
-
/**
|
|
15
|
-
* [Analytics tags](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) for filtering the popular searches.
|
|
16
|
-
*/
|
|
17
14
|
analyticsTags?: string[] | null;
|
|
18
|
-
/**
|
|
19
|
-
* Facets to use as top categories with your suggestions. If provided, Query Suggestions adds the top facet values to each suggestion.
|
|
20
|
-
*/
|
|
21
15
|
facets?: Facet[] | null;
|
|
22
16
|
/**
|
|
23
|
-
* Minimum number of hits required to be included as a suggestion. A search query must at least generate `minHits`
|
|
17
|
+
* 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.
|
|
24
18
|
*/
|
|
25
19
|
minHits?: number;
|
|
26
20
|
/**
|
|
27
21
|
* 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.
|
|
28
22
|
*/
|
|
29
23
|
minLetters?: number;
|
|
30
|
-
generate?: string[][];
|
|
31
|
-
/**
|
|
32
|
-
* Algolia indices with popular searches to use as query suggestions. Records of these indices must have these attributes: - `query`: search query which will be added as a suggestion - `count`: measure of popularity of that search query For example, you can export popular searches from an external analytics tool, such as Google Analytics or Adobe Analytics, and feed this data into an external Algolia index. You can use this external index to generate query suggestions until your Algolia analytics has collected enough data.
|
|
33
|
-
*/
|
|
24
|
+
generate?: string[][] | null;
|
|
34
25
|
external?: string[] | null;
|
|
35
26
|
};
|
|
36
27
|
//# sourceMappingURL=sourceIndex.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceIndex.d.ts","sourceRoot":"","sources":["../../model/sourceIndex.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB
|
|
1
|
+
{"version":3,"file":"sourceIndex.d.ts","sourceRoot":"","sources":["../../model/sourceIndex.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAEhC,MAAM,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IAExB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,QAAQ,CAAC,EAAE,MAAM,EAAE,EAAE,GAAG,IAAI,CAAC;IAE7B,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAC5B,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
|
|
2
2
|
import type { BaseResponse } from '../model/baseResponse';
|
|
3
3
|
import type { CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteConfigProps, GetConfigProps, GetConfigStatusProps, GetLogFileProps, UpdateConfigProps } from '../model/clientMethodProps';
|
|
4
|
+
import type { ConfigurationResponse } from '../model/configurationResponse';
|
|
5
|
+
import type { ConfigurationWithIndex } from '../model/configurationWithIndex';
|
|
4
6
|
import type { GetConfigStatus200Response } from '../model/getConfigStatus200Response';
|
|
5
7
|
import type { GetLogFile200Response } from '../model/getLogFile200Response';
|
|
6
|
-
|
|
7
|
-
import type { QuerySuggestionsConfigurationWithIndex } from '../model/querySuggestionsConfigurationWithIndex';
|
|
8
|
-
export declare const apiClientVersion = "5.0.0-alpha.99";
|
|
8
|
+
export declare const apiClientVersion = "5.0.0-beta.10";
|
|
9
9
|
export declare const REGIONS: readonly ["eu", "us"];
|
|
10
10
|
export type Region = (typeof REGIONS)[number];
|
|
11
11
|
export declare function createQuerySuggestionsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
|
|
@@ -32,17 +32,18 @@ export declare function createQuerySuggestionsClient({ appId: appIdOption, apiKe
|
|
|
32
32
|
*/
|
|
33
33
|
addAlgoliaAgent(segment: string, version?: string): void;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Creates a new Query Suggestions configuration. You can have up to 100 configurations per Algolia application.
|
|
36
36
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
37
|
+
* Required API Key ACLs:
|
|
38
|
+
* - editSettings.
|
|
39
|
+
*
|
|
40
|
+
* @param configurationWithIndex - The configurationWithIndex object.
|
|
39
41
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
40
42
|
*/
|
|
41
|
-
createConfig(
|
|
43
|
+
createConfig(configurationWithIndex: ConfigurationWithIndex, requestOptions?: RequestOptions): Promise<BaseResponse>;
|
|
42
44
|
/**
|
|
43
45
|
* This method allow you to send requests to the Algolia REST API.
|
|
44
46
|
*
|
|
45
|
-
* @summary Send requests to the Algolia REST API.
|
|
46
47
|
* @param customDelete - The customDelete object.
|
|
47
48
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
48
49
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -52,7 +53,6 @@ export declare function createQuerySuggestionsClient({ appId: appIdOption, apiKe
|
|
|
52
53
|
/**
|
|
53
54
|
* This method allow you to send requests to the Algolia REST API.
|
|
54
55
|
*
|
|
55
|
-
* @summary Send requests to the Algolia REST API.
|
|
56
56
|
* @param customGet - The customGet object.
|
|
57
57
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
58
58
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -62,7 +62,6 @@ export declare function createQuerySuggestionsClient({ appId: appIdOption, apiKe
|
|
|
62
62
|
/**
|
|
63
63
|
* This method allow you to send requests to the Algolia REST API.
|
|
64
64
|
*
|
|
65
|
-
* @summary Send requests to the Algolia REST API.
|
|
66
65
|
* @param customPost - The customPost object.
|
|
67
66
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
68
67
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -73,7 +72,6 @@ export declare function createQuerySuggestionsClient({ appId: appIdOption, apiKe
|
|
|
73
72
|
/**
|
|
74
73
|
* This method allow you to send requests to the Algolia REST API.
|
|
75
74
|
*
|
|
76
|
-
* @summary Send requests to the Algolia REST API.
|
|
77
75
|
* @param customPut - The customPut object.
|
|
78
76
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
79
77
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -82,61 +80,69 @@ export declare function createQuerySuggestionsClient({ appId: appIdOption, apiKe
|
|
|
82
80
|
*/
|
|
83
81
|
customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
|
|
84
82
|
/**
|
|
85
|
-
*
|
|
83
|
+
* Deletes a Query Suggestions configuration. Deleting only removes the configuration and stops updates to the Query Suggestions index. To delete the Query Suggestions index itself, use the Search API and the [Delete an index](/specs/search#tag/Indices/operation/deleteIndex) operation.
|
|
84
|
+
*
|
|
85
|
+
* Required API Key ACLs:
|
|
86
|
+
* - editSettings.
|
|
86
87
|
*
|
|
87
|
-
* @summary Delete a configuration.
|
|
88
88
|
* @param deleteConfig - The deleteConfig object.
|
|
89
89
|
* @param deleteConfig.indexName - Query Suggestions index name.
|
|
90
90
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
91
91
|
*/
|
|
92
92
|
deleteConfig({ indexName }: DeleteConfigProps, requestOptions?: RequestOptions): Promise<BaseResponse>;
|
|
93
93
|
/**
|
|
94
|
-
*
|
|
94
|
+
* Retrieves all Query Suggestions configurations of your Algolia application.
|
|
95
|
+
*
|
|
96
|
+
* Required API Key ACLs:
|
|
97
|
+
* - settings.
|
|
95
98
|
*
|
|
96
|
-
* @summary List configurations.
|
|
97
99
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
98
100
|
*/
|
|
99
|
-
getAllConfigs(requestOptions?: RequestOptions): Promise<
|
|
101
|
+
getAllConfigs(requestOptions?: RequestOptions): Promise<ConfigurationResponse[]>;
|
|
100
102
|
/**
|
|
101
|
-
*
|
|
103
|
+
* Retrieves a single Query Suggestions configuration by its index name.
|
|
104
|
+
*
|
|
105
|
+
* Required API Key ACLs:
|
|
106
|
+
* - settings.
|
|
102
107
|
*
|
|
103
|
-
* @summary Get a configuration.
|
|
104
108
|
* @param getConfig - The getConfig object.
|
|
105
109
|
* @param getConfig.indexName - Query Suggestions index name.
|
|
106
110
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
107
111
|
*/
|
|
108
|
-
getConfig({ indexName }: GetConfigProps, requestOptions?: RequestOptions): Promise<
|
|
112
|
+
getConfig({ indexName }: GetConfigProps, requestOptions?: RequestOptions): Promise<ConfigurationResponse>;
|
|
109
113
|
/**
|
|
110
|
-
*
|
|
114
|
+
* Reports the status of a Query Suggestions index.
|
|
115
|
+
*
|
|
116
|
+
* Required API Key ACLs:
|
|
117
|
+
* - settings.
|
|
111
118
|
*
|
|
112
|
-
* @summary Get configuration status.
|
|
113
119
|
* @param getConfigStatus - The getConfigStatus object.
|
|
114
120
|
* @param getConfigStatus.indexName - Query Suggestions index name.
|
|
115
121
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
116
122
|
*/
|
|
117
123
|
getConfigStatus({ indexName }: GetConfigStatusProps, requestOptions?: RequestOptions): Promise<GetConfigStatus200Response>;
|
|
118
124
|
/**
|
|
119
|
-
*
|
|
125
|
+
* Retrieves the logs for a single Query Suggestions index.
|
|
126
|
+
*
|
|
127
|
+
* Required API Key ACLs:
|
|
128
|
+
* - settings.
|
|
120
129
|
*
|
|
121
|
-
* @summary Get logs.
|
|
122
130
|
* @param getLogFile - The getLogFile object.
|
|
123
131
|
* @param getLogFile.indexName - Query Suggestions index name.
|
|
124
132
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
125
133
|
*/
|
|
126
134
|
getLogFile({ indexName }: GetLogFileProps, requestOptions?: RequestOptions): Promise<GetLogFile200Response>;
|
|
127
135
|
/**
|
|
128
|
-
*
|
|
136
|
+
* Updates a QuerySuggestions configuration.
|
|
137
|
+
*
|
|
138
|
+
* Required API Key ACLs:
|
|
139
|
+
* - editSettings.
|
|
129
140
|
*
|
|
130
|
-
* @summary Update a configuration.
|
|
131
141
|
* @param updateConfig - The updateConfig object.
|
|
132
142
|
* @param updateConfig.indexName - Query Suggestions index name.
|
|
133
|
-
* @param updateConfig.
|
|
143
|
+
* @param updateConfig.configuration - The configuration object.
|
|
134
144
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
135
145
|
*/
|
|
136
|
-
updateConfig({ indexName,
|
|
146
|
+
updateConfig({ indexName, configuration }: UpdateConfigProps, requestOptions?: RequestOptions): Promise<BaseResponse>;
|
|
137
147
|
};
|
|
138
|
-
/**
|
|
139
|
-
* The client type.
|
|
140
|
-
*/
|
|
141
|
-
export type QuerySuggestionsClient = ReturnType<typeof createQuerySuggestionsClient>;
|
|
142
148
|
//# sourceMappingURL=querySuggestionsClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"querySuggestionsClient.d.ts","sourceRoot":"","sources":["../../src/querySuggestionsClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,
|
|
1
|
+
{"version":3,"file":"querySuggestionsClient.d.ts","sourceRoot":"","sources":["../../src/querySuggestionsClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAKnB,cAAc,EACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAE5E,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAEhD,eAAO,MAAM,OAAO,uBAAwB,CAAC;AAC7C,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;AAY9C,wBAAgB,4BAA4B,CAAC,EAC3C,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,MAAM,EAAE,YAAY,EACpB,GAAG,OAAO,EACX,EAAE,mBAAmB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE;;IAwBvC;;OAEG;;IAGH;;OAEG;kBACW,OAAO,CAAC,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;;OAQG;yCAEuB,sBAAsB,mBAC7B,cAAc,GAC9B,OAAO,CAAC,YAAY,CAAC;IAsBxB;;;;;;;OAOG;uCAEqB,iBAAiB,mBACtB,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;OAOG;oCAEqB,cAAc,mBACnB,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;OAQG;2CAE2B,eAAe,mBAC1B,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;OAQG;0CAE2B,cAAc,mBACzB,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;;OASG;gCAEc,iBAAiB,mBACf,cAAc,GAC9B,OAAO,CAAC,YAAY,CAAC;IAwBxB;;;;;;;OAOG;mCAEgB,cAAc,GAC9B,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAenC;;;;;;;;;OASG;6BAEc,cAAc,mBACZ,cAAc,GAC9B,OAAO,CAAC,qBAAqB,CAAC;IAwBjC;;;;;;;;;OASG;mCAEc,oBAAoB,mBAClB,cAAc,GAC9B,OAAO,CAAC,0BAA0B,CAAC;IAwBtC;;;;;;;;;OASG;8BAEc,eAAe,mBACb,cAAc,GAC9B,OAAO,CAAC,qBAAqB,CAAC;IAwBjC;;;;;;;;;;OAUG;+CAE6B,iBAAiB,mBAC9B,cAAc,GAC9B,OAAO,CAAC,YAAY,CAAC;EAqC3B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// 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.
|
|
2
2
|
|
|
3
|
-
export type
|
|
3
|
+
export type AppID = {
|
|
4
4
|
/**
|
|
5
|
-
* Query Suggestions
|
|
5
|
+
* Algolia application ID to which this Query Suggestions configuration belongs.
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
appID?: string;
|
|
8
8
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// 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.
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { Configuration } from './configuration';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Properties for the `customDelete` method.
|
|
@@ -114,5 +114,5 @@ export type UpdateConfigProps = {
|
|
|
114
114
|
* Query Suggestions index name.
|
|
115
115
|
*/
|
|
116
116
|
indexName: string;
|
|
117
|
-
|
|
117
|
+
configuration: Configuration;
|
|
118
118
|
};
|
|
@@ -6,7 +6,7 @@ import type { SourceIndex } from './sourceIndex';
|
|
|
6
6
|
/**
|
|
7
7
|
* Query Suggestions configuration.
|
|
8
8
|
*/
|
|
9
|
-
export type
|
|
9
|
+
export type Configuration = {
|
|
10
10
|
/**
|
|
11
11
|
* Algolia indices from which to get the popular searches for query suggestions.
|
|
12
12
|
*/
|
|
@@ -14,18 +14,15 @@ export type QuerySuggestionsConfiguration = {
|
|
|
14
14
|
|
|
15
15
|
languages?: Languages;
|
|
16
16
|
|
|
17
|
-
/**
|
|
18
|
-
* Patterns to exclude from query suggestions.
|
|
19
|
-
*/
|
|
20
17
|
exclude?: string[] | null;
|
|
21
18
|
|
|
22
19
|
/**
|
|
23
|
-
*
|
|
20
|
+
* Whether to turn on personalized query suggestions.
|
|
24
21
|
*/
|
|
25
22
|
enablePersonalization?: boolean;
|
|
26
23
|
|
|
27
24
|
/**
|
|
28
|
-
*
|
|
25
|
+
* Whether to include suggestions with special characters.
|
|
29
26
|
*/
|
|
30
27
|
allowSpecialCharacters?: boolean;
|
|
31
28
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// 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.
|
|
2
|
+
|
|
3
|
+
import type { AppID } from './appID';
|
|
4
|
+
import type { ConfigurationWithIndex } from './configurationWithIndex';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* API response for retrieving Query Suggestions configurations.
|
|
8
|
+
*/
|
|
9
|
+
export type ConfigurationResponse = AppID & ConfigurationWithIndex;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// 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.
|
|
2
|
+
|
|
3
|
+
import type { Configuration } from './configuration';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Query Suggestions configuration.
|
|
7
|
+
*/
|
|
8
|
+
export type ConfigurationWithIndex = Configuration & Record<string, any>;
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
export type GetConfigStatus200Response = {
|
|
4
4
|
/**
|
|
5
|
-
* Query Suggestions index
|
|
5
|
+
* Name of the Query Suggestions index (case-sensitive).
|
|
6
6
|
*/
|
|
7
7
|
indexName?: string;
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Whether the creation or update of the Query Suggestions index is in progress.
|
|
11
11
|
*/
|
|
12
12
|
isRunning?: boolean;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Date and time when the Query Suggestions index was last built, in RFC 3339 format.
|
|
16
16
|
*/
|
|
17
17
|
lastBuiltAt?: string;
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Date and time when the Query Suggestions index was last updated successfully.
|
|
21
21
|
*/
|
|
22
22
|
lastSuccessfulBuiltAt?: string;
|
|
23
23
|
|
|
@@ -4,7 +4,7 @@ import type { LogLevel } from './logLevel';
|
|
|
4
4
|
|
|
5
5
|
export type GetLogFile200Response = {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Date and time of the log entry, in RFC 3339 format.
|
|
8
8
|
*/
|
|
9
9
|
timestamp?: string;
|
|
10
10
|
|
|
@@ -16,7 +16,7 @@ export type GetLogFile200Response = {
|
|
|
16
16
|
message?: string;
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
|
-
* Level indicating the position of a suggestion in a hierarchy of records.
|
|
19
|
+
* 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.
|
|
20
20
|
*/
|
|
21
21
|
contextLevel?: number;
|
|
22
22
|
};
|
package/model/index.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
// 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.
|
|
2
2
|
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './baseQuerySuggestionsConfigurationWithIndex';
|
|
3
|
+
export * from './appID';
|
|
5
4
|
export * from './baseResponse';
|
|
5
|
+
export * from './configuration';
|
|
6
|
+
export * from './configurationResponse';
|
|
7
|
+
export * from './configurationWithIndex';
|
|
6
8
|
export * from './errorBase';
|
|
7
9
|
export * from './facet';
|
|
8
10
|
export * from './getConfigStatus200Response';
|
|
9
11
|
export * from './getLogFile200Response';
|
|
10
12
|
export * from './languages';
|
|
11
13
|
export * from './logLevel';
|
|
12
|
-
export * from './querySuggestionsConfiguration';
|
|
13
|
-
export * from './querySuggestionsConfigurationResponse';
|
|
14
|
-
export * from './querySuggestionsConfigurationWithIndex';
|
|
15
14
|
export * from './sourceIndex';
|
|
16
15
|
export * from './clientMethodProps';
|
package/model/languages.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// 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.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Languages for deduplicating singular and plural suggestions. If specified, only the more popular form is included.
|
|
5
5
|
*/
|
|
6
6
|
export type Languages = string[] | boolean;
|
package/model/logLevel.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// 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.
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* 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.
|
|
5
5
|
*/
|
|
6
6
|
export type LogLevel = 'ERROR' | 'INFO' | 'SKIP';
|
package/model/sourceIndex.ts
CHANGED
|
@@ -7,27 +7,21 @@ import type { Facet } from './facet';
|
|
|
7
7
|
*/
|
|
8
8
|
export type SourceIndex = {
|
|
9
9
|
/**
|
|
10
|
-
* Name of the Algolia index to use as source for query suggestions.
|
|
10
|
+
* Name of the Algolia index (case-sensitive) to use as source for query suggestions.
|
|
11
11
|
*/
|
|
12
12
|
indexName: string;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* If true, Query Suggestions uses all
|
|
15
|
+
* If true, Query Suggestions uses all replica indices to find popular searches. If false, only the primary index is used.
|
|
16
16
|
*/
|
|
17
17
|
replicas?: boolean;
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* [Analytics tags](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) for filtering the popular searches.
|
|
21
|
-
*/
|
|
22
19
|
analyticsTags?: string[] | null;
|
|
23
20
|
|
|
24
|
-
/**
|
|
25
|
-
* Facets to use as top categories with your suggestions. If provided, Query Suggestions adds the top facet values to each suggestion.
|
|
26
|
-
*/
|
|
27
21
|
facets?: Facet[] | null;
|
|
28
22
|
|
|
29
23
|
/**
|
|
30
|
-
* Minimum number of hits required to be included as a suggestion. A search query must at least generate `minHits`
|
|
24
|
+
* 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.
|
|
31
25
|
*/
|
|
32
26
|
minHits?: number;
|
|
33
27
|
|
|
@@ -36,10 +30,7 @@ export type SourceIndex = {
|
|
|
36
30
|
*/
|
|
37
31
|
minLetters?: number;
|
|
38
32
|
|
|
39
|
-
generate?: string[][];
|
|
33
|
+
generate?: string[][] | null;
|
|
40
34
|
|
|
41
|
-
/**
|
|
42
|
-
* Algolia indices with popular searches to use as query suggestions. Records of these indices must have these attributes: - `query`: search query which will be added as a suggestion - `count`: measure of popularity of that search query For example, you can export popular searches from an external analytics tool, such as Google Analytics or Adobe Analytics, and feed this data into an external Algolia index. You can use this external index to generate query suggestions until your Algolia analytics has collected enough data.
|
|
43
|
-
*/
|
|
44
35
|
external?: string[] | null;
|
|
45
36
|
};
|