@algolia/client-query-suggestions 5.0.0-alpha.98 → 5.0.0-beta.1

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.
Files changed (42) hide show
  1. package/dist/builds/browser.d.ts +24 -3
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +24 -3
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/client-query-suggestions.cjs +52 -39
  6. package/dist/client-query-suggestions.esm.browser.js +39 -31
  7. package/dist/client-query-suggestions.esm.node.js +52 -39
  8. package/dist/client-query-suggestions.umd.js +2 -2
  9. package/dist/model/appID.d.ts +7 -0
  10. package/dist/model/appID.d.ts.map +1 -0
  11. package/dist/model/getConfigStatus200Response.d.ts +4 -4
  12. package/dist/model/getLogFile200Response.d.ts +2 -2
  13. package/dist/model/index.d.ts +1 -2
  14. package/dist/model/index.d.ts.map +1 -1
  15. package/dist/model/languages.d.ts +1 -1
  16. package/dist/model/logLevel.d.ts +1 -1
  17. package/dist/model/querySuggestionsConfiguration.d.ts +2 -5
  18. package/dist/model/querySuggestionsConfiguration.d.ts.map +1 -1
  19. package/dist/model/querySuggestionsConfigurationResponse.d.ts +5 -2
  20. package/dist/model/querySuggestionsConfigurationResponse.d.ts.map +1 -1
  21. package/dist/model/querySuggestionsConfigurationWithIndex.d.ts +1 -2
  22. package/dist/model/querySuggestionsConfigurationWithIndex.d.ts.map +1 -1
  23. package/dist/model/sourceIndex.d.ts +4 -13
  24. package/dist/model/sourceIndex.d.ts.map +1 -1
  25. package/dist/src/querySuggestionsClient.d.ts +29 -23
  26. package/dist/src/querySuggestionsClient.d.ts.map +1 -1
  27. package/model/{baseQuerySuggestionsConfigurationWithIndex.ts → appID.ts} +3 -3
  28. package/model/getConfigStatus200Response.ts +4 -4
  29. package/model/getLogFile200Response.ts +2 -2
  30. package/model/index.ts +1 -2
  31. package/model/languages.ts +1 -1
  32. package/model/logLevel.ts +1 -1
  33. package/model/querySuggestionsConfiguration.ts +2 -5
  34. package/model/querySuggestionsConfigurationResponse.ts +6 -4
  35. package/model/querySuggestionsConfigurationWithIndex.ts +1 -2
  36. package/model/sourceIndex.ts +4 -13
  37. package/package.json +7 -7
  38. package/dist/model/baseQuerySuggestionsConfigurationResponse.d.ts +0 -19
  39. package/dist/model/baseQuerySuggestionsConfigurationResponse.d.ts.map +0 -1
  40. package/dist/model/baseQuerySuggestionsConfigurationWithIndex.d.ts +0 -7
  41. package/dist/model/baseQuerySuggestionsConfigurationWithIndex.d.ts.map +0 -1
  42. package/model/baseQuerySuggestionsConfigurationResponse.ts +0 -23
@@ -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 BaseQuerySuggestionsConfigurationWithIndex = {
3
+ export type AppID = {
4
4
  /**
5
- * Query Suggestions index name.
5
+ * Algolia application ID to which this Query Suggestions configuration belongs.
6
6
  */
7
- indexName: string;
7
+ appID?: string;
8
8
  };
@@ -2,22 +2,22 @@
2
2
 
3
3
  export type GetConfigStatus200Response = {
4
4
  /**
5
- * Query Suggestions index name.
5
+ * Name of the Query Suggestions index (case-sensitive).
6
6
  */
7
7
  indexName?: string;
8
8
 
9
9
  /**
10
- * Indicates whether the creation or update of the Query Suggestions is in progress.
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
- * Timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format when the Query Suggestions index was last built.
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
- * Timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format when the Query Suggestions index was last updated successfully.
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
- * Timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
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. For example, a `contextLevel` of 1 indicates that this suggestion belongs to a previous suggestion with `contextLevel` 0.
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,7 +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
- export * from './baseQuerySuggestionsConfigurationResponse';
4
- export * from './baseQuerySuggestionsConfigurationWithIndex';
3
+ export * from './appID';
5
4
  export * from './baseResponse';
6
5
  export * from './errorBase';
7
6
  export * from './facet';
@@ -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
- * Set the language for deduplicating singular and plural suggestions. If specified, only the more popular form is included.
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
- * The 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.
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';
@@ -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
- * Turn on personalized query suggestions.
20
+ * Whether to turn on personalized query suggestions.
24
21
  */
25
22
  enablePersonalization?: boolean;
26
23
 
27
24
  /**
28
- * Allow suggestions with special characters.
25
+ * Whether to include suggestions with special characters.
29
26
  */
30
27
  allowSpecialCharacters?: boolean;
31
28
  };
@@ -1,8 +1,10 @@
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 { BaseQuerySuggestionsConfigurationResponse } from './baseQuerySuggestionsConfigurationResponse';
3
+ import type { AppID } from './appID';
4
4
  import type { QuerySuggestionsConfigurationWithIndex } from './querySuggestionsConfigurationWithIndex';
5
5
 
6
- export type QuerySuggestionsConfigurationResponse =
7
- BaseQuerySuggestionsConfigurationResponse &
8
- QuerySuggestionsConfigurationWithIndex;
6
+ /**
7
+ * API response for retrieving Query Suggestions configurations.
8
+ */
9
+ export type QuerySuggestionsConfigurationResponse = AppID &
10
+ QuerySuggestionsConfigurationWithIndex;
@@ -1,10 +1,9 @@
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 { BaseQuerySuggestionsConfigurationWithIndex } from './baseQuerySuggestionsConfigurationWithIndex';
4
3
  import type { QuerySuggestionsConfiguration } from './querySuggestionsConfiguration';
5
4
 
6
5
  /**
7
6
  * Query Suggestions configuration.
8
7
  */
9
8
  export type QuerySuggestionsConfigurationWithIndex =
10
- BaseQuerySuggestionsConfigurationWithIndex & QuerySuggestionsConfiguration;
9
+ QuerySuggestionsConfiguration & Record<string, any>;
@@ -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 replicas of the primary index to find popular searches. If false, only the primary index is used.
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` hits to be included in the Query Suggestions index.
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/client-query-suggestions",
3
- "version": "5.0.0-alpha.98",
3
+ "version": "5.0.0-beta.1",
4
4
  "description": "JavaScript client for client-query-suggestions",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
@@ -39,14 +39,14 @@
39
39
  "clean": "rm -rf ./dist || true"
40
40
  },
41
41
  "dependencies": {
42
- "@algolia/client-common": "5.0.0-alpha.99",
43
- "@algolia/requester-browser-xhr": "5.0.0-alpha.99",
44
- "@algolia/requester-node-http": "5.0.0-alpha.99"
42
+ "@algolia/client-common": "5.0.0-beta.1",
43
+ "@algolia/requester-browser-xhr": "5.0.0-beta.1",
44
+ "@algolia/requester-node-http": "5.0.0-beta.1"
45
45
  },
46
46
  "devDependencies": {
47
- "@types/node": "20.11.5",
48
- "rollup": "4.9.5",
49
- "typescript": "5.3.3"
47
+ "@types/node": "20.12.7",
48
+ "rollup": "4.14.2",
49
+ "typescript": "5.4.5"
50
50
  },
51
51
  "engines": {
52
52
  "node": ">= 14.0.0"
@@ -1,19 +0,0 @@
1
- export type BaseQuerySuggestionsConfigurationResponse = {
2
- /**
3
- * Your Algolia application ID.
4
- */
5
- appId?: string;
6
- /**
7
- * API key used to read from your source index.
8
- */
9
- sourceIndicesAPIKey?: string;
10
- /**
11
- * API key used to write and configure your Query Suggestions index.
12
- */
13
- suggestionsIndicesAPIKey?: string;
14
- /**
15
- * API key used to read from external Algolia indices.
16
- */
17
- externalIndicesAPIKey?: string;
18
- };
19
- //# sourceMappingURL=baseQuerySuggestionsConfigurationResponse.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"baseQuerySuggestionsConfigurationResponse.d.ts","sourceRoot":"","sources":["../../model/baseQuerySuggestionsConfigurationResponse.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,yCAAyC,GAAG;IACtD;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC"}
@@ -1,7 +0,0 @@
1
- export type BaseQuerySuggestionsConfigurationWithIndex = {
2
- /**
3
- * Query Suggestions index name.
4
- */
5
- indexName: string;
6
- };
7
- //# sourceMappingURL=baseQuerySuggestionsConfigurationWithIndex.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"baseQuerySuggestionsConfigurationWithIndex.d.ts","sourceRoot":"","sources":["../../model/baseQuerySuggestionsConfigurationWithIndex.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,0CAA0C,GAAG;IACvD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
@@ -1,23 +0,0 @@
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
- export type BaseQuerySuggestionsConfigurationResponse = {
4
- /**
5
- * Your Algolia application ID.
6
- */
7
- appId?: string;
8
-
9
- /**
10
- * API key used to read from your source index.
11
- */
12
- sourceIndicesAPIKey?: string;
13
-
14
- /**
15
- * API key used to write and configure your Query Suggestions index.
16
- */
17
- suggestionsIndicesAPIKey?: string;
18
-
19
- /**
20
- * API key used to read from external Algolia indices.
21
- */
22
- externalIndicesAPIKey?: string;
23
- };