Skip to content

Commit 94bdbf3

Browse files
feat(specs): introduce recommend source in Comp API client (generated)
algolia/api-clients-automation#6227 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Clara Muller <5667350+ClaraMuller@users.noreply.github.com>
1 parent e1bd7ee commit 94bdbf3

File tree

7 files changed

+60
-4
lines changed

7 files changed

+60
-4
lines changed

packages/composition/model/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ export * from './injectedItemExternal';
5959
export * from './injectedItemExternalSource';
6060
export * from './injectedItemHitsMetadata';
6161
export * from './injectedItemMetadata';
62+
export * from './injectedItemRecommendSource';
6263
export * from './injectedItemSearch';
6364
export * from './injectedItemSearchSource';
6465
export * from './injectedItemSource';
@@ -75,6 +76,7 @@ export * from './mainRecommend';
7576
export * from './mainSearch';
7677
export * from './matchedGeoLocation';
7778
export * from './matchLevel';
79+
export * from './model';
7880
export * from './multifeed';
7981
export * from './multipleBatchRequest';
8082
export * from './multipleBatchResponse';
@@ -86,6 +88,7 @@ export * from './personalization';
8688
export * from './queryType';
8789
export * from './range';
8890
export * from './rankingInfo';
91+
export * from './recommend';
8992
export * from './redirect';
9093
export * from './redirectRuleIndexData';
9194
export * from './redirectRuleIndexMetadata';
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 { Recommend } from './recommend';
4+
5+
/**
6+
* Injected items will originate from a recommendation request performed on the specified index.
7+
*/
8+
export type InjectedItemRecommendSource = {
9+
recommend: Recommend;
10+
};
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// 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.
22

33
import type { InjectedItemExternalSource } from './injectedItemExternalSource';
4+
import type { InjectedItemRecommendSource } from './injectedItemRecommendSource';
45
import type { InjectedItemSearchSource } from './injectedItemSearchSource';
56

6-
export type InjectedItemSource = InjectedItemSearchSource | InjectedItemExternalSource;
7+
export type InjectedItemSource = InjectedItemSearchSource | InjectedItemExternalSource | InjectedItemRecommendSource;
Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
11
// 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.
22

3+
import type { MainInjectionQueryParameters } from './mainInjectionQueryParameters';
4+
import type { Model } from './model';
5+
36
export type MainRecommend = {
47
/**
5-
* Targeted index name.
8+
* Index to retrieve recommendations from.
69
*/
7-
index: string;
10+
indexName: string;
11+
12+
model: Model;
13+
14+
/**
15+
* Minimum score a recommendation must have to be included.
16+
*/
17+
threshold: number;
18+
19+
queryParameters?: MainInjectionQueryParameters | undefined;
20+
21+
fallbackParameters?: MainInjectionQueryParameters | undefined;
822
};

packages/composition/model/mainSearch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { MainInjectionQueryParameters } from './mainInjectionQueryParameter
44

55
export type MainSearch = {
66
/**
7-
* Targeted index name.
7+
* Index to retrieve search results from.
88
*/
99
index: string;
1010

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+
* Recommendation model to use for retrieving recommendations.
5+
*/
6+
export type Model = 'trending-items';
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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 { BaseInjectionQueryParameters } from './baseInjectionQueryParameters';
4+
import type { Model } from './model';
5+
6+
export type Recommend = {
7+
/**
8+
* Index to retrieve recommendations from.
9+
*/
10+
indexName: string;
11+
12+
model: Model;
13+
14+
/**
15+
* Minimum score a recommendation must have to be included.
16+
*/
17+
threshold: number;
18+
19+
queryParameters?: BaseInjectionQueryParameters | undefined;
20+
21+
fallbackParameters?: BaseInjectionQueryParameters | undefined;
22+
};

0 commit comments

Comments
 (0)