@algolia/client-search 5.8.0 → 5.9.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/index.d.ts CHANGED
@@ -1,2 +1 @@
1
- // eslint-disable-next-line import/no-unresolved
2
1
  export * from './dist/node';
package/index.js CHANGED
@@ -1,2 +1 @@
1
- // eslint-disable-next-line import/no-commonjs,import/extensions
2
1
  module.exports = require('./dist/builds/node.cjs');
@@ -6,7 +6,7 @@ import type { BannerImageUrl } from './bannerImageUrl';
6
6
  * image of a search banner.
7
7
  */
8
8
  export type BannerImage = {
9
- urls?: BannerImageUrl;
9
+ urls?: Array<BannerImageUrl>;
10
10
 
11
11
  title?: string;
12
12
  };
@@ -4,7 +4,7 @@ export type BaseGetApiKeyResponse = {
4
4
  /**
5
5
  * API key.
6
6
  */
7
- value?: string;
7
+ value: string;
8
8
 
9
9
  /**
10
10
  * Timestamp when the object was created, in milliseconds since the Unix epoch.
@@ -24,7 +24,7 @@ export type BaseIndexSettings = {
24
24
  unretrievableAttributes?: Array<string>;
25
25
 
26
26
  /**
27
- * Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
27
+ * Creates a list of [words which require exact matches](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/in-depth/configuring-typo-tolerance/#turn-off-typo-tolerance-for-certain-words). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
28
28
  */
29
29
  disableTypoToleranceOnWords?: Array<string>;
30
30
 
@@ -64,7 +64,7 @@ export type BaseIndexSettings = {
64
64
  numericAttributesForFiltering?: Array<string>;
65
65
 
66
66
  /**
67
- * Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren\'t indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches.
67
+ * Control which non-alphanumeric characters are indexed. By default, Algolia ignores [non-alphanumeric characters](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/#handling-non-alphanumeric-characters) like hyphen (`-`), plus (`+`), and parentheses (`(`,`)`). To include such characters, define them with `separatorsToIndex`. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, in a search for \"Disney+\", Algolia considers \"Disney\" and \"+\" as two separate words.
68
68
  */
69
69
  separatorsToIndex?: string;
70
70
 
@@ -28,6 +28,11 @@ export type BaseSearchResponse = Record<string, any> & {
28
28
 
29
29
  exhaustive?: Exhaustive;
30
30
 
31
+ /**
32
+ * Rules applied to the query.
33
+ */
34
+ appliedRules?: Array<Record<string, unknown>>;
35
+
31
36
  /**
32
37
  * See the `facetsCount` field of the `exhaustive` object in the response.
33
38
  */
@@ -4,5 +4,5 @@ export type GetObjectsResponse<T = Record<string, any>> = {
4
4
  /**
5
5
  * Retrieved records.
6
6
  */
7
- results: T[];
7
+ results?: T[];
8
8
  };
package/model/index.ts CHANGED
@@ -19,7 +19,6 @@ export * from './banner';
19
19
  export * from './bannerImage';
20
20
  export * from './bannerImageUrl';
21
21
  export * from './bannerLink';
22
- export * from './banners';
23
22
  export * from './baseGetApiKeyResponse';
24
23
  export * from './baseIndexSettings';
25
24
  export * from './baseSearchParams';
@@ -148,7 +148,7 @@ export type IndexSettingsAsSearchParams = {
148
148
  exactOnSingleWordQuery?: ExactOnSingleWordQuery;
149
149
 
150
150
  /**
151
- * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
151
+ * Determine which plurals and synonyms should be considered an exact matches. By default, Algolia treats singular and plural forms of a word, and single-word synonyms, as [exact](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#exact) matches when searching. For example: - \"swimsuit\" and \"swimsuits\" are treated the same - \"swimsuit\" and \"swimwear\" are treated the same (if they are [synonyms](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#regular-synonyms)). - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY\" = \"NYC\", are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY\" = \"New York\", are considered exact matches.
152
152
  */
153
153
  alternativesAsExact?: Array<AlternativesAsExact>;
154
154
 
@@ -9,7 +9,7 @@ export type SearchDictionaryEntriesResponse = {
9
9
  hits: Array<DictionaryEntry>;
10
10
 
11
11
  /**
12
- * Requested page of the API response.
12
+ * Requested page of the API response. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
13
13
  */
14
14
  page: number;
15
15
 
@@ -19,12 +19,12 @@ export type SearchRulesParams = {
19
19
  context?: string;
20
20
 
21
21
  /**
22
- * Requested page of the API response.
22
+ * Requested page of the API response. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
23
23
  */
24
24
  page?: number;
25
25
 
26
26
  /**
27
- * Maximum number of hits per page.
27
+ * Maximum number of hits per page. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
28
28
  */
29
29
  hitsPerPage?: number;
30
30
 
@@ -22,7 +22,7 @@ export type SearchUserIdsResponse = {
22
22
  page: number;
23
23
 
24
24
  /**
25
- * Maximum number of hits per page.
25
+ * Maximum number of hits per page. Algolia uses `page` and `hitsPerPage` to control how search results are displayed ([paginated](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/)). - `hitsPerPage`: sets the number of search results (_hits_) displayed per page. - `page`: specifies the page number of the search results you want to retrieve. Page numbering starts at 0, so the first page is `page=0`, the second is `page=1`, and so on. For example, to display 10 results per page starting from the third page, set `hitsPerPage` to 10 and `page` to 2.
26
26
  */
27
27
  hitsPerPage: number;
28
28
 
package/model/widgets.ts CHANGED
@@ -1,10 +1,13 @@
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 { Banners } from './banners';
3
+ import type { Banner } from './banner';
4
4
 
5
5
  /**
6
6
  * widgets returned from any rules that are applied to the current search.
7
7
  */
8
8
  export type Widgets = {
9
- banners?: Banners;
9
+ /**
10
+ * banners defined in the merchandising studio for the given search.
11
+ */
12
+ banners?: Array<Banner>;
10
13
  };
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.8.0",
2
+ "version": "5.9.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/algolia/algoliasearch-client-javascript.git"
@@ -49,18 +49,18 @@
49
49
  "index.d.ts"
50
50
  ],
51
51
  "dependencies": {
52
- "@algolia/client-common": "5.8.0",
53
- "@algolia/requester-browser-xhr": "5.8.0",
54
- "@algolia/requester-fetch": "5.8.0",
55
- "@algolia/requester-node-http": "5.8.0"
52
+ "@algolia/client-common": "5.9.0",
53
+ "@algolia/requester-browser-xhr": "5.9.0",
54
+ "@algolia/requester-fetch": "5.9.0",
55
+ "@algolia/requester-node-http": "5.9.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@arethetypeswrong/cli": "0.16.4",
59
- "@types/node": "22.7.4",
59
+ "@types/node": "22.7.5",
60
60
  "publint": "0.2.11",
61
61
  "rollup": "4.24.0",
62
62
  "tsup": "8.3.0",
63
- "typescript": "5.6.2"
63
+ "typescript": "5.6.3"
64
64
  },
65
65
  "engines": {
66
66
  "node": ">= 14.0.0"
package/model/banners.ts DELETED
@@ -1,10 +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
- import type { Banner } from './banner';
4
-
5
- /**
6
- * banners defined in the merchandising studio for the given search.
7
- */
8
- export type Banners = {
9
- banners?: Banner;
10
- };