Skip to content

Commit 0064836

Browse files
algolia-boteric-zahariaDmytro Sarzhandmytrosarzhan-mono
committed
feat(specs): query categorization (generated)
algolia/api-clients-automation#6258 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Eric Zaharia <94015633+eric-zaharia@users.noreply.github.com> Co-authored-by: Dmytro Sarzhan <dima@MacBook-Pro-Dmytro.local> Co-authored-by: dmytrosarzhan-mono <dmytro.sarzhan@monobank.ua>
1 parent 9cedf39 commit 0064836

26 files changed

Lines changed: 310 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2+
3+
export type AutoFilteringFilterEntry = string | Array<string>;
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2+
3+
import type { AutoFilteringFilterEntry } from './autoFilteringFilterEntry';
4+
5+
/**
6+
* Result of automatic filtering applied by Query Categorization.
7+
*/
8+
export type AutoFilteringResult = {
9+
/**
10+
* Whether automatic filtering was applied to this query.
11+
*/
12+
enabled?: boolean | undefined;
13+
14+
/**
15+
* Maximum category hierarchy depth used for filtering.
16+
*/
17+
maxDepth?: number | undefined;
18+
19+
/**
20+
* Facet filters automatically applied to the query.
21+
*/
22+
facetFilters?: Array<AutoFilteringFilterEntry> | undefined;
23+
24+
/**
25+
* Optional filters automatically applied to boost relevant categories.
26+
*/
27+
optionalFilters?: Array<AutoFilteringFilterEntry> | undefined;
28+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2+
3+
import type { CategoryPredictionBin } from './categoryPredictionBin';
4+
import type { HierarchyPathEntry } from './hierarchyPathEntry';
5+
6+
export type CategoryPrediction = {
7+
bin?: CategoryPredictionBin | undefined;
8+
9+
/**
10+
* Ordered list of category levels from root to the predicted category.
11+
*/
12+
hierarchyPath?: Array<HierarchyPathEntry> | undefined;
13+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2+
3+
/**
4+
* Confidence level of the category prediction.
5+
*/
6+
export type CategoryPredictionBin = 'certain' | 'very high' | 'high' | 'low' | 'very low';
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2+
3+
export type HierarchyPathEntry = {
4+
/**
5+
* Facet attribute name at this hierarchy level, for example, `categories.lvl0`.
6+
*/
7+
facetName?: string | undefined;
8+
9+
/**
10+
* Facet value at this level of the category hierarchy.
11+
*/
12+
facetValue?: string | undefined;
13+
14+
/**
15+
* Depth level in the category hierarchy, starting at 0.
16+
*/
17+
depth?: number | undefined;
18+
};

packages/algoliasearch/lite/model/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ export * from './apiKey';
77
export * from './aroundPrecision';
88
export * from './aroundRadius';
99
export * from './aroundRadiusAll';
10+
export * from './autoFilteringFilterEntry';
11+
export * from './autoFilteringResult';
1012
export * from './automaticFacetFilter';
1113
export * from './automaticFacetFilters';
1214
export * from './banner';
@@ -26,6 +28,8 @@ export * from './boughtTogetherQuery';
2628
export * from './browsePagination';
2729
export * from './browseParamsObject';
2830
export * from './browseResponse';
31+
export * from './categoryPrediction';
32+
export * from './categoryPredictionBin';
2933
export * from './clientMethodProps';
3034
export * from './consequenceParams';
3135
export * from './consequenceQuery';
@@ -47,6 +51,7 @@ export * from './frequentlyBoughtTogether';
4751
export * from './getApiKeyResponse';
4852
export * from './getRecommendationsParams';
4953
export * from './getRecommendationsResponse';
54+
export * from './hierarchyPathEntry';
5055
export * from './highlightResult';
5156
export * from './highlightResultOption';
5257
export * from './hit';
@@ -66,6 +71,8 @@ export * from './optionalFilters';
6671
export * from './optionalWords';
6772
export * from './params';
6873
export * from './personalization';
74+
export * from './queryCategorization';
75+
export * from './queryCategorizationType';
6976
export * from './queryType';
7077
export * from './range';
7178
export * from './rankingInfo';
@@ -87,6 +94,9 @@ export * from './removeStopWords';
8794
export * from './removeWordsIfNoResults';
8895
export * from './renderingContent';
8996
export * from './reRankingApplyFilter';
97+
export * from './responseExtensions';
98+
export * from './searchExtensions';
99+
export * from './searchExtensionsQueryCategorization';
90100
export * from './searchForFacets';
91101
export * from './searchForFacetsOptions';
92102
export * from './searchForFacetValuesResponse';
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2+
3+
import type { AutoFilteringResult } from './autoFilteringResult';
4+
import type { CategoryPrediction } from './categoryPrediction';
5+
import type { QueryCategorizationType } from './queryCategorizationType';
6+
7+
/**
8+
* Query Categorization prediction returned by the AI model. This field is empty when the model cannot categorize the query. See [Query Categorization](https://www.algolia.com/doc/guides/algolia-ai/query-categorization/).
9+
*/
10+
export type QueryCategorization = {
11+
/**
12+
* Processed and normalized version of the original search query.
13+
*/
14+
normalizedQuery?: string | undefined;
15+
16+
/**
17+
* Number of times this normalized query was observed during the training window.
18+
*/
19+
count?: number | undefined;
20+
21+
type?: QueryCategorizationType | undefined;
22+
23+
/**
24+
* List of category predictions with confidence levels.
25+
*/
26+
categories?: Array<CategoryPrediction> | undefined;
27+
28+
autofiltering?: AutoFilteringResult | undefined;
29+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2+
3+
/**
4+
* Classification of the query scope.
5+
*/
6+
export type QueryCategorizationType = 'narrow' | 'broad' | 'ambiguous' | 'none';
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2+
3+
import type { QueryCategorization } from './queryCategorization';
4+
5+
/**
6+
* AI-generated metadata returned alongside search results. Present when Algolia AI features such as [Query Categorization](https://www.algolia.com/doc/guides/algolia-ai/query-categorization/) are enabled.
7+
*/
8+
export type ResponseExtensions = {
9+
queryCategorization?: QueryCategorization | undefined;
10+
};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2+
3+
import type { SearchExtensionsQueryCategorization } from './searchExtensionsQueryCategorization';
4+
5+
/**
6+
* Additional parameters for Algolia AI features. Used to enable [Query Categorization](https://www.algolia.com/doc/guides/algolia-ai/query-categorization/) and other AI-powered capabilities.
7+
*/
8+
export type SearchExtensions = {
9+
queryCategorization?: SearchExtensionsQueryCategorization | undefined;
10+
};

0 commit comments

Comments
 (0)