@algolia/composition 1.15.0 → 1.16.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.
- package/README.md +8 -9
- package/dist/browser.d.ts +42 -29
- package/dist/builds/browser.js +3 -3
- package/dist/builds/browser.js.map +1 -1
- package/dist/builds/browser.min.js +1 -1
- package/dist/builds/browser.min.js.map +1 -1
- package/dist/builds/browser.umd.js +2 -2
- package/dist/builds/fetch.js +3 -3
- package/dist/builds/fetch.js.map +1 -1
- package/dist/builds/node.cjs +3 -3
- package/dist/builds/node.cjs.map +1 -1
- package/dist/builds/node.js +3 -3
- package/dist/builds/node.js.map +1 -1
- package/dist/builds/worker.js +3 -3
- package/dist/builds/worker.js.map +1 -1
- package/dist/fetch.d.ts +42 -29
- package/dist/node.d.cts +42 -29
- package/dist/node.d.ts +42 -29
- package/dist/src/compositionClient.cjs +3 -3
- package/dist/src/compositionClient.cjs.map +1 -1
- package/dist/src/compositionClient.js +3 -3
- package/dist/src/compositionClient.js.map +1 -1
- package/dist/worker.d.ts +42 -29
- package/package.json +9 -9
package/dist/node.d.ts
CHANGED
|
@@ -6,6 +6,18 @@ import { CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/cli
|
|
|
6
6
|
*/
|
|
7
7
|
type Action = 'upsert' | 'delete';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Deduplication positioning configures how a duplicate result should be resolved between an injected item and main search results. Current configuration supports: - \'highest\': always select the item in the highest position, and remove duplicates that appear lower in the results. - \'highestInjected\': duplicate result will be moved to its highest possible injected position, but not higher. If a duplicate appears higher in main search results, it will be removed to stay it\'s intended group position (which could be lower than main).
|
|
11
|
+
*/
|
|
12
|
+
type DedupPositioning = 'highest' | 'highestInjected';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Deduplication configures the methods used to resolve duplicate items between main search results and injected group results.
|
|
16
|
+
*/
|
|
17
|
+
type Deduplication = {
|
|
18
|
+
positioning: DedupPositioning;
|
|
19
|
+
};
|
|
20
|
+
|
|
9
21
|
/**
|
|
10
22
|
* Adds the provided metadata to each injected hit via an `_extra` attribute.
|
|
11
23
|
*/
|
|
@@ -66,7 +78,7 @@ type IgnorePlurals = Array<SupportedLanguage> | BooleanString | boolean;
|
|
|
66
78
|
type NumericFilters = Array<NumericFilters> | string;
|
|
67
79
|
|
|
68
80
|
/**
|
|
69
|
-
* Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don\'t exclude records from the search results. Records that match the optional filter rank before records that don\'t match. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match. - Optional filters don\'t work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria
|
|
81
|
+
* Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don\'t exclude records from the search results. Records that match the optional filter rank before records that don\'t match. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match. - Optional filters don\'t work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters are applied _before_ custom ranking attributes (in the default [ranking](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria)). - Optional filters don\'t work with numeric attributes.
|
|
70
82
|
*/
|
|
71
83
|
type OptionalFilters = Array<OptionalFilters> | string;
|
|
72
84
|
|
|
@@ -76,7 +88,7 @@ type OptionalFilters = Array<OptionalFilters> | string;
|
|
|
76
88
|
type OptionalWords = string | Array<string>;
|
|
77
89
|
|
|
78
90
|
/**
|
|
79
|
-
* Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching
|
|
91
|
+
* Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching).
|
|
80
92
|
*/
|
|
81
93
|
type QueryType = 'prefixLast' | 'prefixAll' | 'prefixNone';
|
|
82
94
|
|
|
@@ -86,7 +98,7 @@ type QueryType = 'prefixLast' | 'prefixAll' | 'prefixNone';
|
|
|
86
98
|
type RemoveStopWords = Array<SupportedLanguage> | boolean;
|
|
87
99
|
|
|
88
100
|
/**
|
|
89
|
-
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results
|
|
101
|
+
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results).
|
|
90
102
|
*/
|
|
91
103
|
type RemoveWordsIfNoResults = 'none' | 'lastWords' | 'firstWords' | 'allOptional';
|
|
92
104
|
|
|
@@ -96,7 +108,7 @@ type RemoveWordsIfNoResults = 'none' | 'lastWords' | 'firstWords' | 'allOptional
|
|
|
96
108
|
type TypoToleranceEnum = 'min' | 'strict' | 'true' | 'false';
|
|
97
109
|
|
|
98
110
|
/**
|
|
99
|
-
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance
|
|
111
|
+
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation) are also active.
|
|
100
112
|
*/
|
|
101
113
|
type TypoTolerance = boolean | TypoToleranceEnum;
|
|
102
114
|
|
|
@@ -126,7 +138,7 @@ type BaseInjectionQueryParameters = {
|
|
|
126
138
|
*/
|
|
127
139
|
attributeCriteriaComputedByMinProximity?: boolean | undefined;
|
|
128
140
|
/**
|
|
129
|
-
* Attributes to highlight By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js
|
|
141
|
+
* Attributes to highlight By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js).
|
|
130
142
|
*/
|
|
131
143
|
attributesToHighlight?: Array<string> | undefined;
|
|
132
144
|
/**
|
|
@@ -138,7 +150,7 @@ type BaseInjectionQueryParameters = {
|
|
|
138
150
|
*/
|
|
139
151
|
attributesToSnippet?: Array<string> | undefined;
|
|
140
152
|
/**
|
|
141
|
-
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started
|
|
153
|
+
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started).
|
|
142
154
|
*/
|
|
143
155
|
clickAnalytics?: boolean | undefined;
|
|
144
156
|
/**
|
|
@@ -150,7 +162,7 @@ type BaseInjectionQueryParameters = {
|
|
|
150
162
|
*/
|
|
151
163
|
disableExactOnAttributes?: Array<string> | undefined;
|
|
152
164
|
/**
|
|
153
|
-
* Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance
|
|
165
|
+
* Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance). Attribute names are case-sensitive Returning only exact matches can help when - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.
|
|
154
166
|
*/
|
|
155
167
|
disableTypoToleranceOnAttributes?: Array<string> | undefined;
|
|
156
168
|
distinct?: Distinct | undefined;
|
|
@@ -163,7 +175,7 @@ type BaseInjectionQueryParameters = {
|
|
|
163
175
|
*/
|
|
164
176
|
enablePersonalization?: boolean | undefined;
|
|
165
177
|
/**
|
|
166
|
-
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking
|
|
178
|
+
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
|
|
167
179
|
*/
|
|
168
180
|
enableReRanking?: boolean | undefined;
|
|
169
181
|
/**
|
|
@@ -173,7 +185,7 @@ type BaseInjectionQueryParameters = {
|
|
|
173
185
|
exactOnSingleWordQuery?: ExactOnSingleWordQuery | undefined;
|
|
174
186
|
facetFilters?: FacetFilters | undefined;
|
|
175
187
|
/**
|
|
176
|
-
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering
|
|
188
|
+
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering).
|
|
177
189
|
*/
|
|
178
190
|
filters?: string | undefined;
|
|
179
191
|
/**
|
|
@@ -221,7 +233,7 @@ type BaseInjectionQueryParameters = {
|
|
|
221
233
|
*/
|
|
222
234
|
personalizationImpact?: number | undefined;
|
|
223
235
|
/**
|
|
224
|
-
* Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first** **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages
|
|
236
|
+
* Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first** **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations).
|
|
225
237
|
*/
|
|
226
238
|
queryLanguages?: Array<SupportedLanguage> | undefined;
|
|
227
239
|
queryType?: QueryType | undefined;
|
|
@@ -328,6 +340,7 @@ type Injection = {
|
|
|
328
340
|
* list of injected items of the current Composition.
|
|
329
341
|
*/
|
|
330
342
|
injectedItems?: Array<InjectedItem> | undefined;
|
|
343
|
+
deduplication?: Deduplication | undefined;
|
|
331
344
|
};
|
|
332
345
|
|
|
333
346
|
type CompositionBehavior = {
|
|
@@ -484,7 +497,7 @@ type MultipleBatchResponse = {
|
|
|
484
497
|
|
|
485
498
|
type RulesMultipleBatchResponse = {
|
|
486
499
|
/**
|
|
487
|
-
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](
|
|
500
|
+
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](https://www.algolia.com/doc/rest-api/search/get-task) and this task ID.
|
|
488
501
|
*/
|
|
489
502
|
taskID: number;
|
|
490
503
|
};
|
|
@@ -518,7 +531,7 @@ type FacetHits = {
|
|
|
518
531
|
*/
|
|
519
532
|
highlighted: string;
|
|
520
533
|
/**
|
|
521
|
-
* Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/
|
|
534
|
+
* Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate).
|
|
522
535
|
*/
|
|
523
536
|
count: number;
|
|
524
537
|
};
|
|
@@ -530,7 +543,7 @@ type SearchForFacetValuesResults = {
|
|
|
530
543
|
*/
|
|
531
544
|
facetHits: Array<FacetHits>;
|
|
532
545
|
/**
|
|
533
|
-
* Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/
|
|
546
|
+
* Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate).
|
|
534
547
|
*/
|
|
535
548
|
exhaustiveFacetsCount: boolean;
|
|
536
549
|
/**
|
|
@@ -574,7 +587,7 @@ type CompositionBaseSearchResponse = Record<string, any> & {
|
|
|
574
587
|
*/
|
|
575
588
|
type Exhaustive = {
|
|
576
589
|
/**
|
|
577
|
-
* Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/
|
|
590
|
+
* Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate).
|
|
578
591
|
*/
|
|
579
592
|
facetsCount?: boolean | undefined;
|
|
580
593
|
/**
|
|
@@ -642,7 +655,7 @@ type RedirectRuleIndexMetadata = {
|
|
|
642
655
|
};
|
|
643
656
|
|
|
644
657
|
/**
|
|
645
|
-
* [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects
|
|
658
|
+
* [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects), this this parameter is for internal use only.
|
|
646
659
|
*/
|
|
647
660
|
type Redirect = {
|
|
648
661
|
index?: Array<RedirectRuleIndexMetadata> | undefined;
|
|
@@ -839,7 +852,7 @@ type BaseSearchResponse = Record<string, any> & {
|
|
|
839
852
|
*/
|
|
840
853
|
userData?: any | null | undefined;
|
|
841
854
|
/**
|
|
842
|
-
* Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics
|
|
855
|
+
* Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics).
|
|
843
856
|
*/
|
|
844
857
|
queryID?: string | undefined;
|
|
845
858
|
/**
|
|
@@ -1090,7 +1103,7 @@ type SearchResponse<T = Record<string, unknown>> = CompositionBaseSearchResponse
|
|
|
1090
1103
|
|
|
1091
1104
|
type TaskIDResponse = {
|
|
1092
1105
|
/**
|
|
1093
|
-
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](
|
|
1106
|
+
* Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](https://www.algolia.com/doc/rest-api/search/get-task) and this task ID.
|
|
1094
1107
|
*/
|
|
1095
1108
|
taskID: number;
|
|
1096
1109
|
};
|
|
@@ -1173,7 +1186,7 @@ type Params = {
|
|
|
1173
1186
|
*/
|
|
1174
1187
|
query?: string | undefined;
|
|
1175
1188
|
/**
|
|
1176
|
-
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering
|
|
1189
|
+
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering).
|
|
1177
1190
|
*/
|
|
1178
1191
|
filters?: string | undefined;
|
|
1179
1192
|
/**
|
|
@@ -1215,7 +1228,7 @@ type Params = {
|
|
|
1215
1228
|
*/
|
|
1216
1229
|
insidePolygon?: Array<Array<number>> | undefined;
|
|
1217
1230
|
/**
|
|
1218
|
-
* Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first** **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages
|
|
1231
|
+
* Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first** **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations).
|
|
1219
1232
|
*/
|
|
1220
1233
|
queryLanguages?: Array<SupportedLanguage> | undefined;
|
|
1221
1234
|
/**
|
|
@@ -1231,11 +1244,11 @@ type Params = {
|
|
|
1231
1244
|
*/
|
|
1232
1245
|
ruleContexts?: Array<string> | undefined;
|
|
1233
1246
|
/**
|
|
1234
|
-
* Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken
|
|
1247
|
+
* Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken).
|
|
1235
1248
|
*/
|
|
1236
1249
|
userToken?: string | undefined;
|
|
1237
1250
|
/**
|
|
1238
|
-
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started
|
|
1251
|
+
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started).
|
|
1239
1252
|
*/
|
|
1240
1253
|
clickAnalytics?: boolean | undefined;
|
|
1241
1254
|
/**
|
|
@@ -1243,7 +1256,7 @@ type Params = {
|
|
|
1243
1256
|
*/
|
|
1244
1257
|
analytics?: boolean | undefined;
|
|
1245
1258
|
/**
|
|
1246
|
-
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments
|
|
1259
|
+
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).
|
|
1247
1260
|
*/
|
|
1248
1261
|
analyticsTags?: Array<string> | undefined;
|
|
1249
1262
|
/**
|
|
@@ -1251,7 +1264,7 @@ type Params = {
|
|
|
1251
1264
|
*/
|
|
1252
1265
|
enableABTest?: boolean | undefined;
|
|
1253
1266
|
/**
|
|
1254
|
-
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking
|
|
1267
|
+
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
|
|
1255
1268
|
*/
|
|
1256
1269
|
enableReRanking?: boolean | undefined;
|
|
1257
1270
|
/**
|
|
@@ -1280,11 +1293,11 @@ type SearchCompositionRulesParams = {
|
|
|
1280
1293
|
*/
|
|
1281
1294
|
context?: string | undefined;
|
|
1282
1295
|
/**
|
|
1283
|
-
* 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
|
|
1296
|
+
* 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.
|
|
1284
1297
|
*/
|
|
1285
1298
|
page?: number | undefined;
|
|
1286
1299
|
/**
|
|
1287
|
-
* 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
|
|
1300
|
+
* 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.
|
|
1288
1301
|
*/
|
|
1289
1302
|
hitsPerPage?: number | undefined;
|
|
1290
1303
|
/**
|
|
@@ -1534,7 +1547,7 @@ type WaitForCompositionTaskOptions = {
|
|
|
1534
1547
|
compositionID: string;
|
|
1535
1548
|
};
|
|
1536
1549
|
|
|
1537
|
-
declare const apiClientVersion = "1.
|
|
1550
|
+
declare const apiClientVersion = "1.16.1";
|
|
1538
1551
|
declare function createCompositionClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
1539
1552
|
transporter: _algolia_client_common.Transporter;
|
|
1540
1553
|
/**
|
|
@@ -1648,7 +1661,7 @@ declare function createCompositionClient({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
1648
1661
|
*/
|
|
1649
1662
|
getComposition({ compositionID }: GetCompositionProps, requestOptions?: RequestOptions): Promise<Composition>;
|
|
1650
1663
|
/**
|
|
1651
|
-
* Retrieves a rule by its ID.
|
|
1664
|
+
* Retrieves a rule by its ID. To find the object ID of a rule, use the [`search` operation](https://www.algolia.com/doc/rest-api/composition/search-composition-rules).
|
|
1652
1665
|
*
|
|
1653
1666
|
* Required API Key ACLs:
|
|
1654
1667
|
* - editSettings
|
|
@@ -1707,7 +1720,7 @@ declare function createCompositionClient({ appId: appIdOption, apiKey: apiKeyOpt
|
|
|
1707
1720
|
*/
|
|
1708
1721
|
putComposition({ compositionID, composition }: PutCompositionProps, requestOptions?: RequestOptions): Promise<TaskIDResponse>;
|
|
1709
1722
|
/**
|
|
1710
|
-
*
|
|
1723
|
+
* If a composition rule with the provided ID already exists, it\'s replaced. Otherwise, a new one is added.
|
|
1711
1724
|
*
|
|
1712
1725
|
* Required API Key ACLs:
|
|
1713
1726
|
* - editSettings
|
|
@@ -1776,4 +1789,4 @@ type CompositionClient = ReturnType<typeof createCompositionClient>;
|
|
|
1776
1789
|
|
|
1777
1790
|
declare function compositionClient(appId: string, apiKey: string, options?: ClientOptions | undefined): CompositionClient;
|
|
1778
1791
|
|
|
1779
|
-
export { type Action, type AdvancedSyntaxFeatures, type AlternativesAsExact, type Anchoring, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type Banner, type BannerImage, type BannerImageUrl, type BannerLink, type BaseInjectionQueryParameters, type BaseSearchResponse, type BatchCompositionAction, type BatchParams, type BooleanString, type Composition, type CompositionBaseSearchResponse, type CompositionBehavior, type CompositionClient, type CompositionIdRankingInfo, type CompositionRankingInfo, type CompositionRule, type CompositionRuleConsequence, type CompositionRulesBatchParams, type CompositionRunAppliedRules, type CompositionRunSearchResponse, type CompositionSource, type CompositionSourceSearch, type CompositionsSearchResponse, type Condition, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteCompositionAction, type DeleteCompositionProps, type DeleteCompositionRuleAction, type DeleteCompositionRuleProps, type Distinct, type ErrorBase, type ExactOnSingleWordQuery, type Exhaustive, type External, type ExternalInjectedItem, type ExternalInjection, type ExternalOrdering, type ExternalSource, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type Facets, type GetCompositionProps, type GetRuleProps, type GetTaskProps, type GetTaskResponse, type HighlightResult, type HighlightResultOption, type Hit, type HitMetadata, type HitRankingInfo, type IgnorePlurals, type InjectedItem, type InjectedItemHitsMetadata, type InjectedItemMetadata, type InjectedItemSource, type Injection, type InsideBoundingBox, type ListCompositionsProps, type ListCompositionsResponse, type Main, type MainInjectionQueryParameters, type MatchLevel, type MatchedGeoLocation, type MultipleBatchRequest, type MultipleBatchResponse, type NumericFilters, type OptionalFilters, type OptionalWords, type Params, type Personalization, type PutCompositionProps, type PutCompositionRuleProps, type QueryType, type Range, type RankingInfo, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RemoveStopWords, type RemoveWordsIfNoResults, type RenderingContent, type RequestBody, type ResultsCompositionInfoResponse, type ResultsCompositionsResponse, type ResultsInjectedItemAppliedRulesInfoResponse, type ResultsInjectedItemInfoResponse, type RulesBatchCompositionAction, type RulesMultipleBatchRequest, type RulesMultipleBatchResponse, type SaveRulesProps, type Search, type SearchCompositionRulesParams, type SearchCompositionRulesProps, type SearchCompositionRulesResponse, type SearchForFacetValuesParams, type SearchForFacetValuesProps, type SearchForFacetValuesRequest, type SearchForFacetValuesResponse, type SearchForFacetValuesResults, type SearchHits, type SearchPagination, type SearchProps, type SearchResponse, type SearchResults, type SearchResultsItem, type SearchSource, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type SupportedLanguage, type TaskIDResponse, type TaskStatus, type TimeRange, type TypoTolerance, type TypoToleranceEnum, type Value, type WaitForCompositionTaskOptions, type Widgets, apiClientVersion, compositionClient };
|
|
1792
|
+
export { type Action, type AdvancedSyntaxFeatures, type AlternativesAsExact, type Anchoring, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type Banner, type BannerImage, type BannerImageUrl, type BannerLink, type BaseInjectionQueryParameters, type BaseSearchResponse, type BatchCompositionAction, type BatchParams, type BooleanString, type Composition, type CompositionBaseSearchResponse, type CompositionBehavior, type CompositionClient, type CompositionIdRankingInfo, type CompositionRankingInfo, type CompositionRule, type CompositionRuleConsequence, type CompositionRulesBatchParams, type CompositionRunAppliedRules, type CompositionRunSearchResponse, type CompositionSource, type CompositionSourceSearch, type CompositionsSearchResponse, type Condition, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DedupPositioning, type Deduplication, type DeleteCompositionAction, type DeleteCompositionProps, type DeleteCompositionRuleAction, type DeleteCompositionRuleProps, type Distinct, type ErrorBase, type ExactOnSingleWordQuery, type Exhaustive, type External, type ExternalInjectedItem, type ExternalInjection, type ExternalOrdering, type ExternalSource, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type Facets, type GetCompositionProps, type GetRuleProps, type GetTaskProps, type GetTaskResponse, type HighlightResult, type HighlightResultOption, type Hit, type HitMetadata, type HitRankingInfo, type IgnorePlurals, type InjectedItem, type InjectedItemHitsMetadata, type InjectedItemMetadata, type InjectedItemSource, type Injection, type InsideBoundingBox, type ListCompositionsProps, type ListCompositionsResponse, type Main, type MainInjectionQueryParameters, type MatchLevel, type MatchedGeoLocation, type MultipleBatchRequest, type MultipleBatchResponse, type NumericFilters, type OptionalFilters, type OptionalWords, type Params, type Personalization, type PutCompositionProps, type PutCompositionRuleProps, type QueryType, type Range, type RankingInfo, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RemoveStopWords, type RemoveWordsIfNoResults, type RenderingContent, type RequestBody, type ResultsCompositionInfoResponse, type ResultsCompositionsResponse, type ResultsInjectedItemAppliedRulesInfoResponse, type ResultsInjectedItemInfoResponse, type RulesBatchCompositionAction, type RulesMultipleBatchRequest, type RulesMultipleBatchResponse, type SaveRulesProps, type Search, type SearchCompositionRulesParams, type SearchCompositionRulesProps, type SearchCompositionRulesResponse, type SearchForFacetValuesParams, type SearchForFacetValuesProps, type SearchForFacetValuesRequest, type SearchForFacetValuesResponse, type SearchForFacetValuesResults, type SearchHits, type SearchPagination, type SearchProps, type SearchResponse, type SearchResults, type SearchResultsItem, type SearchSource, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type SupportedLanguage, type TaskIDResponse, type TaskStatus, type TimeRange, type TypoTolerance, type TypoToleranceEnum, type Value, type WaitForCompositionTaskOptions, type Widgets, apiClientVersion, compositionClient };
|
|
@@ -25,7 +25,7 @@ __export(compositionClient_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(compositionClient_exports);
|
|
27
27
|
var import_client_common = require("@algolia/client-common");
|
|
28
|
-
var apiClientVersion = "1.
|
|
28
|
+
var apiClientVersion = "1.16.1";
|
|
29
29
|
function getDefaultHosts(appId) {
|
|
30
30
|
return [
|
|
31
31
|
{
|
|
@@ -333,7 +333,7 @@ function createCompositionClient({
|
|
|
333
333
|
return transporter.request(request, requestOptions);
|
|
334
334
|
},
|
|
335
335
|
/**
|
|
336
|
-
* Retrieves a rule by its ID.
|
|
336
|
+
* Retrieves a rule by its ID. To find the object ID of a rule, use the [`search` operation](https://www.algolia.com/doc/rest-api/composition/search-composition-rules).
|
|
337
337
|
*
|
|
338
338
|
* Required API Key ACLs:
|
|
339
339
|
* - editSettings
|
|
@@ -491,7 +491,7 @@ function createCompositionClient({
|
|
|
491
491
|
return transporter.request(request, requestOptions);
|
|
492
492
|
},
|
|
493
493
|
/**
|
|
494
|
-
*
|
|
494
|
+
* If a composition rule with the provided ID already exists, it\'s replaced. Otherwise, a new one is added.
|
|
495
495
|
*
|
|
496
496
|
* Required API Key ACLs:
|
|
497
497
|
* - editSettings
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/compositionClient.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 {\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\nimport { createAuth, createIterablePromise, createTransporter, getAlgoliaAgent, shuffle } from '@algolia/client-common';\n\nimport type { BatchParams } from '../model/batchParams';\nimport type { Composition } from '../model/composition';\nimport type { CompositionRule } from '../model/compositionRule';\n\nimport type { GetTaskResponse } from '../model/getTaskResponse';\nimport type { ListCompositionsResponse } from '../model/listCompositionsResponse';\nimport type { MultipleBatchResponse } from '../model/multipleBatchResponse';\n\nimport type { RulesMultipleBatchResponse } from '../model/rulesMultipleBatchResponse';\n\nimport type { SearchCompositionRulesResponse } from '../model/searchCompositionRulesResponse';\n\nimport type { SearchForFacetValuesResponse } from '../model/searchForFacetValuesResponse';\nimport type { SearchResponse } from '../model/searchResponse';\nimport type { TaskIDResponse } from '../model/taskIDResponse';\n\nimport type {\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeleteCompositionProps,\n DeleteCompositionRuleProps,\n GetCompositionProps,\n GetRuleProps,\n GetTaskProps,\n ListCompositionsProps,\n PutCompositionProps,\n PutCompositionRuleProps,\n SaveRulesProps,\n SearchCompositionRulesProps,\n SearchForFacetValuesProps,\n SearchProps,\n WaitForCompositionTaskOptions,\n} from '../model/clientMethodProps';\n\nexport const apiClientVersion = '1.15.0';\n\nfunction getDefaultHosts(appId: string): Host[] {\n return (\n [\n {\n url: `${appId}-dsn.algolia.net`,\n accept: 'read',\n protocol: 'https',\n },\n {\n url: `${appId}.algolia.net`,\n accept: 'write',\n protocol: 'https',\n },\n ] as Host[]\n ).concat(\n shuffle([\n {\n url: `${appId}-1.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n {\n url: `${appId}-2.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n {\n url: `${appId}-3.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n ]),\n );\n}\n\nexport function createCompositionClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}: CreateClientOptions) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(appIdOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'Composition',\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 * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\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 | undefined): void {\n 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 if (!authMode || authMode === 'WithinHeaders') {\n transporter.baseHeaders['x-algolia-api-key'] = apiKey;\n } else {\n transporter.baseQueryParameters['x-algolia-api-key'] = apiKey;\n }\n },\n\n /**\n * Helper: Wait for a composition-level task to be published (completed) for a given `compositionID` and `taskID`.\n *\n * @summary Helper method that waits for a task to be published (completed).\n * @param WaitForCompositionTaskOptions - The `WaitForCompositionTaskOptions` object.\n * @param WaitForCompositionTaskOptions.compositionID - The `compositionID` where the operation was performed.\n * @param WaitForCompositionTaskOptions.taskID - The `taskID` returned in the method response.\n * @param WaitForCompositionTaskOptions.maxRetries - The maximum number of retries. 50 by default.\n * @param WaitForCompositionTaskOptions.timeout - The function to decide how long to wait between retries.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.\n */\n waitForCompositionTask(\n {\n compositionID,\n taskID,\n maxRetries = 50,\n timeout = (retryCount: number): number => Math.min(retryCount * 200, 5000),\n }: WaitForCompositionTaskOptions,\n requestOptions?: RequestOptions,\n ): Promise<GetTaskResponse> {\n let retryCount = 0;\n\n return createIterablePromise({\n func: () => this.getTask({ compositionID, taskID }, requestOptions),\n validate: (response) => response.status === 'published',\n aggregator: () => (retryCount += 1),\n error: {\n validate: () => retryCount >= maxRetries,\n message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`,\n },\n timeout: () => timeout(retryCount),\n });\n },\n\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\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 lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\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 lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\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 lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\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 * Delete a composition from the current Algolia application.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteComposition - The deleteComposition object.\n * @param deleteComposition.compositionID - Unique Composition ObjectID.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteComposition(\n { compositionID }: DeleteCompositionProps,\n requestOptions?: RequestOptions,\n ): Promise<TaskIDResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `deleteComposition`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}'.replace(\n '{compositionID}',\n encodeURIComponent(compositionID),\n );\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 * Delete a Composition Rule from the specified Composition ID.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteCompositionRule - The deleteCompositionRule object.\n * @param deleteCompositionRule.compositionID - Unique Composition ObjectID.\n * @param deleteCompositionRule.objectID - Unique identifier of a rule object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteCompositionRule(\n { compositionID, objectID }: DeleteCompositionRuleProps,\n requestOptions?: RequestOptions,\n ): Promise<TaskIDResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `deleteCompositionRule`.');\n }\n\n if (!objectID) {\n throw new Error('Parameter `objectID` is required when calling `deleteCompositionRule`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/rules/{objectID}'\n .replace('{compositionID}', encodeURIComponent(compositionID))\n .replace('{objectID}', encodeURIComponent(objectID));\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 * Retrieve a single composition in the current Algolia application.\n *\n * Required API Key ACLs:\n * - editSettings\n * - settings\n * @param getComposition - The getComposition object.\n * @param getComposition.compositionID - Unique Composition ObjectID.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getComposition({ compositionID }: GetCompositionProps, requestOptions?: RequestOptions): Promise<Composition> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `getComposition`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}'.replace(\n '{compositionID}',\n encodeURIComponent(compositionID),\n );\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 rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).\n *\n * Required API Key ACLs:\n * - editSettings\n * - settings\n * @param getRule - The getRule object.\n * @param getRule.compositionID - Unique Composition ObjectID.\n * @param getRule.objectID - Unique identifier of a rule object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRule({ compositionID, objectID }: GetRuleProps, requestOptions?: RequestOptions): Promise<CompositionRule> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `getRule`.');\n }\n\n if (!objectID) {\n throw new Error('Parameter `objectID` is required when calling `getRule`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/rules/{objectID}'\n .replace('{compositionID}', encodeURIComponent(compositionID))\n .replace('{objectID}', encodeURIComponent(objectID));\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 * Checks the status of a given task.\n *\n * Required API Key ACLs:\n * - editSettings\n * - settings\n * - addObject\n * - deleteObject\n * - deleteIndex\n * @param getTask - The getTask object.\n * @param getTask.compositionID - Unique Composition ObjectID.\n * @param getTask.taskID - Unique task identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTask({ compositionID, taskID }: GetTaskProps, requestOptions?: RequestOptions): Promise<GetTaskResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `getTask`.');\n }\n\n if (!taskID) {\n throw new Error('Parameter `taskID` is required when calling `getTask`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/task/{taskID}'\n .replace('{compositionID}', encodeURIComponent(compositionID))\n .replace('{taskID}', encodeURIComponent(taskID));\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 * Lists all compositions in the current Algolia application.\n *\n * Required API Key ACLs:\n * - editSettings\n * - settings\n * @param listCompositions - The listCompositions object.\n * @param listCompositions.page - Requested page of the API response. If `null`, the API response is not paginated.\n * @param listCompositions.hitsPerPage - Number of hits per page.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listCompositions(\n { page, hitsPerPage }: ListCompositionsProps = {},\n requestOptions: RequestOptions | undefined = undefined,\n ): Promise<ListCompositionsResponse> {\n const requestPath = '/1/compositions';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n if (page !== undefined) {\n queryParameters['page'] = page.toString();\n }\n\n if (hitsPerPage !== undefined) {\n queryParameters['hitsPerPage'] = hitsPerPage.toString();\n }\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 * Adds, updates, or deletes compositions with a single API request.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param batchParams - The batchParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n multipleBatch(batchParams: BatchParams, requestOptions?: RequestOptions): Promise<MultipleBatchResponse> {\n if (!batchParams) {\n throw new Error('Parameter `batchParams` is required when calling `multipleBatch`.');\n }\n\n if (!batchParams.requests) {\n throw new Error('Parameter `batchParams.requests` is required when calling `multipleBatch`.');\n }\n\n const requestPath = '/1/compositions/*/batch';\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: batchParams,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Upsert a composition in the current Algolia application.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param putComposition - The putComposition object.\n * @param putComposition.compositionID - Unique Composition ObjectID.\n * @param putComposition.composition - The composition object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n putComposition(\n { compositionID, composition }: PutCompositionProps,\n requestOptions?: RequestOptions,\n ): Promise<TaskIDResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `putComposition`.');\n }\n\n if (!composition) {\n throw new Error('Parameter `composition` is required when calling `putComposition`.');\n }\n\n if (!composition.objectID) {\n throw new Error('Parameter `composition.objectID` is required when calling `putComposition`.');\n }\n if (!composition.name) {\n throw new Error('Parameter `composition.name` is required when calling `putComposition`.');\n }\n if (!composition.behavior) {\n throw new Error('Parameter `composition.behavior` is required when calling `putComposition`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}'.replace(\n '{compositionID}',\n encodeURIComponent(compositionID),\n );\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: composition,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Upsert a Composition Rule for the specified composition ID.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param putCompositionRule - The putCompositionRule object.\n * @param putCompositionRule.compositionID - Unique Composition ObjectID.\n * @param putCompositionRule.objectID - Unique identifier of a rule object.\n * @param putCompositionRule.compositionRule - The compositionRule object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n putCompositionRule(\n { compositionID, objectID, compositionRule }: PutCompositionRuleProps,\n requestOptions?: RequestOptions,\n ): Promise<TaskIDResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `putCompositionRule`.');\n }\n\n if (!objectID) {\n throw new Error('Parameter `objectID` is required when calling `putCompositionRule`.');\n }\n\n if (!compositionRule) {\n throw new Error('Parameter `compositionRule` is required when calling `putCompositionRule`.');\n }\n\n if (!compositionRule.objectID) {\n throw new Error('Parameter `compositionRule.objectID` is required when calling `putCompositionRule`.');\n }\n if (!compositionRule.conditions) {\n throw new Error('Parameter `compositionRule.conditions` is required when calling `putCompositionRule`.');\n }\n if (!compositionRule.consequence) {\n throw new Error('Parameter `compositionRule.consequence` is required when calling `putCompositionRule`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/rules/{objectID}'\n .replace('{compositionID}', encodeURIComponent(compositionID))\n .replace('{objectID}', encodeURIComponent(objectID));\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: compositionRule,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Create or update or delete multiple composition rules.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param saveRules - The saveRules object.\n * @param saveRules.compositionID - Unique Composition ObjectID.\n * @param saveRules.rules - The rules object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n saveRules(\n { compositionID, rules }: SaveRulesProps,\n requestOptions?: RequestOptions,\n ): Promise<RulesMultipleBatchResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `saveRules`.');\n }\n\n if (!rules) {\n throw new Error('Parameter `rules` is required when calling `saveRules`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/rules/batch'.replace(\n '{compositionID}',\n encodeURIComponent(compositionID),\n );\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: rules,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Runs a query on a single composition and returns matching results.\n *\n * Required API Key ACLs:\n * - search\n * @param search - The search object.\n * @param search.compositionID - Unique Composition ObjectID.\n * @param search.requestBody - The requestBody object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n search<T>(\n { compositionID, requestBody }: SearchProps,\n requestOptions?: RequestOptions,\n ): Promise<SearchResponse<T>> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `search`.');\n }\n\n if (!requestBody) {\n throw new Error('Parameter `requestBody` is required when calling `search`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/run'.replace(\n '{compositionID}',\n encodeURIComponent(compositionID),\n );\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: requestBody,\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Searches for composition rules in your index.\n *\n * Required API Key ACLs:\n * - settings\n * @param searchCompositionRules - The searchCompositionRules object.\n * @param searchCompositionRules.compositionID - Unique Composition ObjectID.\n * @param searchCompositionRules.searchCompositionRulesParams - The searchCompositionRulesParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchCompositionRules(\n { compositionID, searchCompositionRulesParams }: SearchCompositionRulesProps,\n requestOptions?: RequestOptions,\n ): Promise<SearchCompositionRulesResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `searchCompositionRules`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/rules/search'.replace(\n '{compositionID}',\n encodeURIComponent(compositionID),\n );\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: searchCompositionRulesParams ? searchCompositionRulesParams : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Searches for values of a specified facet attribute on the composition\\'s main source\\'s index. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\\'t work if you have **more than 65 searchable facets and searchable attributes combined**.\n *\n * Required API Key ACLs:\n * - search\n * @param searchForFacetValues - The searchForFacetValues object.\n * @param searchForFacetValues.compositionID - Unique Composition ObjectID.\n * @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.\n * @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForFacetValues(\n { compositionID, facetName, searchForFacetValuesRequest }: SearchForFacetValuesProps,\n requestOptions?: RequestOptions,\n ): Promise<SearchForFacetValuesResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `searchForFacetValues`.');\n }\n\n if (!facetName) {\n throw new Error('Parameter `facetName` is required when calling `searchForFacetValues`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/facets/{facetName}/query'\n .replace('{compositionID}', encodeURIComponent(compositionID))\n .replace('{facetName}', encodeURIComponent(facetName));\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: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,2BAA+F;AAsCxF,IAAM,mBAAmB;AAEhC,SAAS,gBAAgB,OAAuB;AAC9C,SACE;AAAA,IACE;AAAA,MACE,KAAK,GAAG,KAAK;AAAA,MACb,QAAQ;AAAA,MACR,UAAU;AAAA,IACZ;AAAA,IACA;AAAA,MACE,KAAK,GAAG,KAAK;AAAA,MACb,QAAQ;AAAA,MACR,UAAU;AAAA,IACZ;AAAA,EACF,EACA;AAAA,QACA,8BAAQ;AAAA,MACN;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAEO,SAAS,wBAAwB;AAAA,EACtC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAwB;AACtB,QAAM,WAAO,iCAAW,aAAa,cAAc,QAAQ;AAC3D,QAAM,kBAAc,wCAAkB;AAAA,IACpC,OAAO,gBAAgB,WAAW;AAAA,IAClC,GAAG;AAAA,IACH,kBAAc,sCAAgB;AAAA,MAC5B;AAAA,MACA,QAAQ;AAAA,MACR,SAAS;AAAA,IACX,CAAC;AAAA,IACD,aAAa;AAAA,MACX,gBAAgB;AAAA,MAChB,GAAG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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,qBACE,EAAE,eAAe,WAAW,4BAA4B,GACxD,gBACuC;AACvC,UAAI,CAAC,eAAe;AAClB,cAAM,IAAI,MAAM,4EAA4E;AAAA,MAC9F;AAEA,UAAI,CAAC,WAAW;AACd,cAAM,IAAI,MAAM,wEAAwE;AAAA,MAC1F;AAEA,YAAM,cAAc,2DACjB,QAAQ,mBAAmB,mBAAmB,aAAa,CAAC,EAC5D,QAAQ,eAAe,mBAAmB,SAAS,CAAC;AACvD,YAAM,UAAmB,CAAC;AAC1B,YAAM,kBAAmC,CAAC;AAE1C,YAAM,UAAmB;AAAA,QACvB,QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,MAAM,8BAA8B,8BAA8B,CAAC;AAAA,QACnE,oBAAoB;AAAA,QACpB,WAAW;AAAA,MACb;AAEA,aAAO,YAAY,QAAQ,SAAS,cAAc;AAAA,IACpD;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/compositionClient.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 {\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\nimport { createAuth, createIterablePromise, createTransporter, getAlgoliaAgent, shuffle } from '@algolia/client-common';\n\nimport type { BatchParams } from '../model/batchParams';\nimport type { Composition } from '../model/composition';\nimport type { CompositionRule } from '../model/compositionRule';\n\nimport type { GetTaskResponse } from '../model/getTaskResponse';\nimport type { ListCompositionsResponse } from '../model/listCompositionsResponse';\nimport type { MultipleBatchResponse } from '../model/multipleBatchResponse';\n\nimport type { RulesMultipleBatchResponse } from '../model/rulesMultipleBatchResponse';\n\nimport type { SearchCompositionRulesResponse } from '../model/searchCompositionRulesResponse';\n\nimport type { SearchForFacetValuesResponse } from '../model/searchForFacetValuesResponse';\nimport type { SearchResponse } from '../model/searchResponse';\nimport type { TaskIDResponse } from '../model/taskIDResponse';\n\nimport type {\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeleteCompositionProps,\n DeleteCompositionRuleProps,\n GetCompositionProps,\n GetRuleProps,\n GetTaskProps,\n ListCompositionsProps,\n PutCompositionProps,\n PutCompositionRuleProps,\n SaveRulesProps,\n SearchCompositionRulesProps,\n SearchForFacetValuesProps,\n SearchProps,\n WaitForCompositionTaskOptions,\n} from '../model/clientMethodProps';\n\nexport const apiClientVersion = '1.16.1';\n\nfunction getDefaultHosts(appId: string): Host[] {\n return (\n [\n {\n url: `${appId}-dsn.algolia.net`,\n accept: 'read',\n protocol: 'https',\n },\n {\n url: `${appId}.algolia.net`,\n accept: 'write',\n protocol: 'https',\n },\n ] as Host[]\n ).concat(\n shuffle([\n {\n url: `${appId}-1.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n {\n url: `${appId}-2.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n {\n url: `${appId}-3.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n ]),\n );\n}\n\nexport function createCompositionClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}: CreateClientOptions) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(appIdOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'Composition',\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 * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\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 | undefined): void {\n 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 if (!authMode || authMode === 'WithinHeaders') {\n transporter.baseHeaders['x-algolia-api-key'] = apiKey;\n } else {\n transporter.baseQueryParameters['x-algolia-api-key'] = apiKey;\n }\n },\n\n /**\n * Helper: Wait for a composition-level task to be published (completed) for a given `compositionID` and `taskID`.\n *\n * @summary Helper method that waits for a task to be published (completed).\n * @param WaitForCompositionTaskOptions - The `WaitForCompositionTaskOptions` object.\n * @param WaitForCompositionTaskOptions.compositionID - The `compositionID` where the operation was performed.\n * @param WaitForCompositionTaskOptions.taskID - The `taskID` returned in the method response.\n * @param WaitForCompositionTaskOptions.maxRetries - The maximum number of retries. 50 by default.\n * @param WaitForCompositionTaskOptions.timeout - The function to decide how long to wait between retries.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.\n */\n waitForCompositionTask(\n {\n compositionID,\n taskID,\n maxRetries = 50,\n timeout = (retryCount: number): number => Math.min(retryCount * 200, 5000),\n }: WaitForCompositionTaskOptions,\n requestOptions?: RequestOptions,\n ): Promise<GetTaskResponse> {\n let retryCount = 0;\n\n return createIterablePromise({\n func: () => this.getTask({ compositionID, taskID }, requestOptions),\n validate: (response) => response.status === 'published',\n aggregator: () => (retryCount += 1),\n error: {\n validate: () => retryCount >= maxRetries,\n message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`,\n },\n timeout: () => timeout(retryCount),\n });\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customDelete - The customDelete object.\n * @param customDelete.path - Path of the endpoint, for example `1/newFeature`.\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 lets you send requests to the Algolia REST API.\n * @param customGet - The customGet object.\n * @param customGet.path - Path of the endpoint, for example `1/newFeature`.\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 lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\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 lets you send requests to the Algolia REST API.\n * @param customPut - The customPut object.\n * @param customPut.path - Path of the endpoint, for example `1/newFeature`.\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 * Delete a composition from the current Algolia application.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteComposition - The deleteComposition object.\n * @param deleteComposition.compositionID - Unique Composition ObjectID.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteComposition(\n { compositionID }: DeleteCompositionProps,\n requestOptions?: RequestOptions,\n ): Promise<TaskIDResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `deleteComposition`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}'.replace(\n '{compositionID}',\n encodeURIComponent(compositionID),\n );\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 * Delete a Composition Rule from the specified Composition ID.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param deleteCompositionRule - The deleteCompositionRule object.\n * @param deleteCompositionRule.compositionID - Unique Composition ObjectID.\n * @param deleteCompositionRule.objectID - Unique identifier of a rule object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n deleteCompositionRule(\n { compositionID, objectID }: DeleteCompositionRuleProps,\n requestOptions?: RequestOptions,\n ): Promise<TaskIDResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `deleteCompositionRule`.');\n }\n\n if (!objectID) {\n throw new Error('Parameter `objectID` is required when calling `deleteCompositionRule`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/rules/{objectID}'\n .replace('{compositionID}', encodeURIComponent(compositionID))\n .replace('{objectID}', encodeURIComponent(objectID));\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 * Retrieve a single composition in the current Algolia application.\n *\n * Required API Key ACLs:\n * - editSettings\n * - settings\n * @param getComposition - The getComposition object.\n * @param getComposition.compositionID - Unique Composition ObjectID.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getComposition({ compositionID }: GetCompositionProps, requestOptions?: RequestOptions): Promise<Composition> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `getComposition`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}'.replace(\n '{compositionID}',\n encodeURIComponent(compositionID),\n );\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 rule by its ID. To find the object ID of a rule, use the [`search` operation](https://www.algolia.com/doc/rest-api/composition/search-composition-rules).\n *\n * Required API Key ACLs:\n * - editSettings\n * - settings\n * @param getRule - The getRule object.\n * @param getRule.compositionID - Unique Composition ObjectID.\n * @param getRule.objectID - Unique identifier of a rule object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRule({ compositionID, objectID }: GetRuleProps, requestOptions?: RequestOptions): Promise<CompositionRule> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `getRule`.');\n }\n\n if (!objectID) {\n throw new Error('Parameter `objectID` is required when calling `getRule`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/rules/{objectID}'\n .replace('{compositionID}', encodeURIComponent(compositionID))\n .replace('{objectID}', encodeURIComponent(objectID));\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 * Checks the status of a given task.\n *\n * Required API Key ACLs:\n * - editSettings\n * - settings\n * - addObject\n * - deleteObject\n * - deleteIndex\n * @param getTask - The getTask object.\n * @param getTask.compositionID - Unique Composition ObjectID.\n * @param getTask.taskID - Unique task identifier.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getTask({ compositionID, taskID }: GetTaskProps, requestOptions?: RequestOptions): Promise<GetTaskResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `getTask`.');\n }\n\n if (!taskID) {\n throw new Error('Parameter `taskID` is required when calling `getTask`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/task/{taskID}'\n .replace('{compositionID}', encodeURIComponent(compositionID))\n .replace('{taskID}', encodeURIComponent(taskID));\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 * Lists all compositions in the current Algolia application.\n *\n * Required API Key ACLs:\n * - editSettings\n * - settings\n * @param listCompositions - The listCompositions object.\n * @param listCompositions.page - Requested page of the API response. If `null`, the API response is not paginated.\n * @param listCompositions.hitsPerPage - Number of hits per page.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n listCompositions(\n { page, hitsPerPage }: ListCompositionsProps = {},\n requestOptions: RequestOptions | undefined = undefined,\n ): Promise<ListCompositionsResponse> {\n const requestPath = '/1/compositions';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n if (page !== undefined) {\n queryParameters['page'] = page.toString();\n }\n\n if (hitsPerPage !== undefined) {\n queryParameters['hitsPerPage'] = hitsPerPage.toString();\n }\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 * Adds, updates, or deletes compositions with a single API request.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param batchParams - The batchParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n multipleBatch(batchParams: BatchParams, requestOptions?: RequestOptions): Promise<MultipleBatchResponse> {\n if (!batchParams) {\n throw new Error('Parameter `batchParams` is required when calling `multipleBatch`.');\n }\n\n if (!batchParams.requests) {\n throw new Error('Parameter `batchParams.requests` is required when calling `multipleBatch`.');\n }\n\n const requestPath = '/1/compositions/*/batch';\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: batchParams,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Upsert a composition in the current Algolia application.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param putComposition - The putComposition object.\n * @param putComposition.compositionID - Unique Composition ObjectID.\n * @param putComposition.composition - The composition object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n putComposition(\n { compositionID, composition }: PutCompositionProps,\n requestOptions?: RequestOptions,\n ): Promise<TaskIDResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `putComposition`.');\n }\n\n if (!composition) {\n throw new Error('Parameter `composition` is required when calling `putComposition`.');\n }\n\n if (!composition.objectID) {\n throw new Error('Parameter `composition.objectID` is required when calling `putComposition`.');\n }\n if (!composition.name) {\n throw new Error('Parameter `composition.name` is required when calling `putComposition`.');\n }\n if (!composition.behavior) {\n throw new Error('Parameter `composition.behavior` is required when calling `putComposition`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}'.replace(\n '{compositionID}',\n encodeURIComponent(compositionID),\n );\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: composition,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * If a composition rule with the provided ID already exists, it\\'s replaced. Otherwise, a new one is added.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param putCompositionRule - The putCompositionRule object.\n * @param putCompositionRule.compositionID - Unique Composition ObjectID.\n * @param putCompositionRule.objectID - Unique identifier of a rule object.\n * @param putCompositionRule.compositionRule - The compositionRule object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n putCompositionRule(\n { compositionID, objectID, compositionRule }: PutCompositionRuleProps,\n requestOptions?: RequestOptions,\n ): Promise<TaskIDResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `putCompositionRule`.');\n }\n\n if (!objectID) {\n throw new Error('Parameter `objectID` is required when calling `putCompositionRule`.');\n }\n\n if (!compositionRule) {\n throw new Error('Parameter `compositionRule` is required when calling `putCompositionRule`.');\n }\n\n if (!compositionRule.objectID) {\n throw new Error('Parameter `compositionRule.objectID` is required when calling `putCompositionRule`.');\n }\n if (!compositionRule.conditions) {\n throw new Error('Parameter `compositionRule.conditions` is required when calling `putCompositionRule`.');\n }\n if (!compositionRule.consequence) {\n throw new Error('Parameter `compositionRule.consequence` is required when calling `putCompositionRule`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/rules/{objectID}'\n .replace('{compositionID}', encodeURIComponent(compositionID))\n .replace('{objectID}', encodeURIComponent(objectID));\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: compositionRule,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Create or update or delete multiple composition rules.\n *\n * Required API Key ACLs:\n * - editSettings\n * @param saveRules - The saveRules object.\n * @param saveRules.compositionID - Unique Composition ObjectID.\n * @param saveRules.rules - The rules object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n saveRules(\n { compositionID, rules }: SaveRulesProps,\n requestOptions?: RequestOptions,\n ): Promise<RulesMultipleBatchResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `saveRules`.');\n }\n\n if (!rules) {\n throw new Error('Parameter `rules` is required when calling `saveRules`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/rules/batch'.replace(\n '{compositionID}',\n encodeURIComponent(compositionID),\n );\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: rules,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Runs a query on a single composition and returns matching results.\n *\n * Required API Key ACLs:\n * - search\n * @param search - The search object.\n * @param search.compositionID - Unique Composition ObjectID.\n * @param search.requestBody - The requestBody object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n search<T>(\n { compositionID, requestBody }: SearchProps,\n requestOptions?: RequestOptions,\n ): Promise<SearchResponse<T>> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `search`.');\n }\n\n if (!requestBody) {\n throw new Error('Parameter `requestBody` is required when calling `search`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/run'.replace(\n '{compositionID}',\n encodeURIComponent(compositionID),\n );\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: requestBody,\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Searches for composition rules in your index.\n *\n * Required API Key ACLs:\n * - settings\n * @param searchCompositionRules - The searchCompositionRules object.\n * @param searchCompositionRules.compositionID - Unique Composition ObjectID.\n * @param searchCompositionRules.searchCompositionRulesParams - The searchCompositionRulesParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchCompositionRules(\n { compositionID, searchCompositionRulesParams }: SearchCompositionRulesProps,\n requestOptions?: RequestOptions,\n ): Promise<SearchCompositionRulesResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `searchCompositionRules`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/rules/search'.replace(\n '{compositionID}',\n encodeURIComponent(compositionID),\n );\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: searchCompositionRulesParams ? searchCompositionRulesParams : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Searches for values of a specified facet attribute on the composition\\'s main source\\'s index. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\\'t work if you have **more than 65 searchable facets and searchable attributes combined**.\n *\n * Required API Key ACLs:\n * - search\n * @param searchForFacetValues - The searchForFacetValues object.\n * @param searchForFacetValues.compositionID - Unique Composition ObjectID.\n * @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.\n * @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForFacetValues(\n { compositionID, facetName, searchForFacetValuesRequest }: SearchForFacetValuesProps,\n requestOptions?: RequestOptions,\n ): Promise<SearchForFacetValuesResponse> {\n if (!compositionID) {\n throw new Error('Parameter `compositionID` is required when calling `searchForFacetValues`.');\n }\n\n if (!facetName) {\n throw new Error('Parameter `facetName` is required when calling `searchForFacetValues`.');\n }\n\n const requestPath = '/1/compositions/{compositionID}/facets/{facetName}/query'\n .replace('{compositionID}', encodeURIComponent(compositionID))\n .replace('{facetName}', encodeURIComponent(facetName));\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: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);\n },\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,2BAA+F;AAsCxF,IAAM,mBAAmB;AAEhC,SAAS,gBAAgB,OAAuB;AAC9C,SACE;AAAA,IACE;AAAA,MACE,KAAK,GAAG,KAAK;AAAA,MACb,QAAQ;AAAA,MACR,UAAU;AAAA,IACZ;AAAA,IACA;AAAA,MACE,KAAK,GAAG,KAAK;AAAA,MACb,QAAQ;AAAA,MACR,UAAU;AAAA,IACZ;AAAA,EACF,EACA;AAAA,QACA,8BAAQ;AAAA,MACN;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAEO,SAAS,wBAAwB;AAAA,EACtC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAwB;AACtB,QAAM,WAAO,iCAAW,aAAa,cAAc,QAAQ;AAC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CAAC;AAC1B,YAAM,kBAAmC,CAAC;AAE1C,YAAM,UAAmB;AAAA,QACvB,QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,MAAM,+BAA+B,+BAA+B,CAAC;AAAA,MACvE;AAEA,aAAO,YAAY,QAAQ,SAAS,cAAc;AAAA,IACpD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAaA,qBACE,EAAE,eAAe,WAAW,4BAA4B,GACxD,gBACuC;AACvC,UAAI,CAAC,eAAe;AAClB,cAAM,IAAI,MAAM,4EAA4E;AAAA,MAC9F;AAEA,UAAI,CAAC,WAAW;AACd,cAAM,IAAI,MAAM,wEAAwE;AAAA,MAC1F;AAEA,YAAM,cAAc,2DACjB,QAAQ,mBAAmB,mBAAmB,aAAa,CAAC,EAC5D,QAAQ,eAAe,mBAAmB,SAAS,CAAC;AACvD,YAAM,UAAmB,CAAC;AAC1B,YAAM,kBAAmC,CAAC;AAE1C,YAAM,UAAmB;AAAA,QACvB,QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,MAAM,8BAA8B,8BAA8B,CAAC;AAAA,QACnE,oBAAoB;AAAA,QACpB,WAAW;AAAA,MACb;AAEA,aAAO,YAAY,QAAQ,SAAS,cAAc;AAAA,IACpD;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/compositionClient.ts
|
|
2
2
|
import { createAuth, createIterablePromise, createTransporter, getAlgoliaAgent, shuffle } from "@algolia/client-common";
|
|
3
|
-
var apiClientVersion = "1.
|
|
3
|
+
var apiClientVersion = "1.16.1";
|
|
4
4
|
function getDefaultHosts(appId) {
|
|
5
5
|
return [
|
|
6
6
|
{
|
|
@@ -308,7 +308,7 @@ function createCompositionClient({
|
|
|
308
308
|
return transporter.request(request, requestOptions);
|
|
309
309
|
},
|
|
310
310
|
/**
|
|
311
|
-
* Retrieves a rule by its ID.
|
|
311
|
+
* Retrieves a rule by its ID. To find the object ID of a rule, use the [`search` operation](https://www.algolia.com/doc/rest-api/composition/search-composition-rules).
|
|
312
312
|
*
|
|
313
313
|
* Required API Key ACLs:
|
|
314
314
|
* - editSettings
|
|
@@ -466,7 +466,7 @@ function createCompositionClient({
|
|
|
466
466
|
return transporter.request(request, requestOptions);
|
|
467
467
|
},
|
|
468
468
|
/**
|
|
469
|
-
*
|
|
469
|
+
* If a composition rule with the provided ID already exists, it\'s replaced. Otherwise, a new one is added.
|
|
470
470
|
*
|
|
471
471
|
* Required API Key ACLs:
|
|
472
472
|
* - editSettings
|