Skip to content

Commit 5ea8250

Browse files
algolia-bote-krebsshortcuts
committed
feat(specs): update composition specs according to upcoming API changes (generated)
algolia/api-clients-automation#4234 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Emmanuel Krebs <e-krebs@users.noreply.github.com> Co-authored-by: shortcuts <vannicattec@gmail.com>
1 parent 781b14d commit 5ea8250

19 files changed

+110
-27
lines changed

packages/client-composition/model/composition.ts

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ export type Composition = {
1111
/**
1212
* Composition name.
1313
*/
14+
name: string;
15+
16+
/**
17+
* Composition description.
18+
*/
1419
description?: string;
1520

1621
behavior: CompositionBehavior;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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 { CompositionsSearchResponse } from './compositionsSearchResponse';
4+
5+
export type CompositionBaseSearchResponse = Record<string, any> & {
6+
compositions?: CompositionsSearchResponse;
7+
};
Original file line numberDiff line numberDiff line change
@@ -1,7 +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

3-
export type ComposedRankingInfo = {
3+
export type CompositionIdRankingInfo = {
44
index: string;
55

6-
inset: string;
6+
injectedItemKey: string;
77
};
Original file line numberDiff line numberDiff line change
@@ -1,7 +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

3-
import type { ComposedRankingInfo } from './composedRankingInfo';
3+
import type { CompositionIdRankingInfo } from './compositionIdRankingInfo';
44

55
export type CompositionRankingInfo = {
6-
composed?: ComposedRankingInfo;
6+
composed?: { [key: string]: CompositionIdRankingInfo };
77
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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 CompositionRunAppliedRules = {
4+
/**
5+
* Unique record identifier.
6+
*/
7+
objectID: string;
8+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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 { CompositionRunAppliedRules } from './compositionRunAppliedRules';
4+
5+
export type CompositionRunSearchResponse = Record<string, any> & {
6+
/**
7+
* Unique record identifier.
8+
*/
9+
objectID: string;
10+
11+
appliedRules?: Array<CompositionRunAppliedRules>;
12+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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 { CompositionRunSearchResponse } from './compositionRunSearchResponse';
4+
5+
export type CompositionsSearchResponse = Record<string, any> & {
6+
run: Array<CompositionRunSearchResponse>;
7+
};

packages/client-composition/model/index.ts

+13-5
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,19 @@ export * from './batchCompositionAction';
1616
export * from './batchParams';
1717
export * from './booleanString';
1818
export * from './clientMethodProps';
19-
export * from './composedRankingInfo';
2019
export * from './composition';
20+
export * from './compositionBaseSearchResponse';
2121
export * from './compositionBehavior';
22-
export * from './compositionInset';
23-
export * from './compositionInsetSource';
24-
export * from './compositionInsetSourceSearch';
22+
export * from './compositionIdRankingInfo';
2523
export * from './compositionRankingInfo';
2624
export * from './compositionRule';
2725
export * from './compositionRuleConsequence';
2826
export * from './compositionRulesBatchParams';
27+
export * from './compositionRunAppliedRules';
28+
export * from './compositionRunSearchResponse';
2929
export * from './compositionSource';
3030
export * from './compositionSourceSearch';
31+
export * from './compositionsSearchResponse';
3132
export * from './condition';
3233
export * from './deleteCompositionAction';
3334
export * from './deleteCompositionRuleAction';
@@ -46,8 +47,11 @@ export * from './highlightResultOption';
4647
export * from './hit';
4748
export * from './hitRankingInfo';
4849
export * from './ignorePlurals';
50+
export * from './injectedItem';
51+
export * from './injectedItemSource';
52+
export * from './injectedItemSourceSearch';
53+
export * from './injectedItemsQueryParameters';
4954
export * from './injection';
50-
export * from './insetsQueryParameters';
5155
export * from './insideBoundingBox';
5256
export * from './listCompositionsResponse';
5357
export * from './main';
@@ -72,6 +76,10 @@ export * from './removeStopWords';
7276
export * from './removeWordsIfNoResults';
7377
export * from './renderingContent';
7478
export * from './requestBody';
79+
export * from './resultsCompositionInfoResponse';
80+
export * from './resultsCompositionsResponse';
81+
export * from './resultsInjectedItemAppliedRulesInfoResponse';
82+
export * from './resultsInjectedItemInfoResponse';
7583
export * from './rulesBatchCompositionAction';
7684
export * from './rulesMultipleBatchRequest';
7785
export * from './rulesMultipleBatchResponse';

packages/client-composition/model/compositionInset.ts renamed to packages/client-composition/model/injectedItem.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
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 { CompositionInsetSource } from './compositionInsetSource';
3+
import type { InjectedItemSource } from './injectedItemSource';
44

5-
export type CompositionInset = {
5+
export type InjectedItem = {
66
/**
7-
* Inset name.
7+
* injected Item unique identifier.
88
*/
9-
name: string;
9+
key: string;
1010

11-
source: CompositionInsetSource;
11+
source: InjectedItemSource;
1212

1313
position: number;
1414

Original file line numberDiff line numberDiff line change
@@ -1,7 +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

3-
import type { CompositionInsetSourceSearch } from './compositionInsetSourceSearch';
3+
import type { InjectedItemSourceSearch } from './injectedItemSourceSearch';
44

5-
export type CompositionInsetSource = {
6-
search: CompositionInsetSourceSearch;
5+
export type InjectedItemSource = {
6+
search: InjectedItemSourceSearch;
77
};
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
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 { InsetsQueryParameters } from './insetsQueryParameters';
3+
import type { InjectedItemsQueryParameters } from './injectedItemsQueryParameters';
44

5-
export type CompositionInsetSourceSearch = {
5+
export type InjectedItemSourceSearch = {
66
/**
77
* Composition Main Index name.
88
*/
99
index: string;
1010

11-
params?: InsetsQueryParameters;
11+
params?: InjectedItemsQueryParameters;
1212
};

packages/client-composition/model/insetsQueryParameters.ts renamed to packages/client-composition/model/injectedItemsQueryParameters.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import type { RemoveWordsIfNoResults } from './removeWordsIfNoResults';
1515
import type { SupportedLanguage } from './supportedLanguage';
1616
import type { TypoTolerance } from './typoTolerance';
1717

18-
export type InsetsQueryParameters = {
18+
export type InjectedItemsQueryParameters = {
1919
/**
2020
* Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. Attribute names are case-sensitive. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included.
2121
*/
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
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 { CompositionInset } from './compositionInset';
3+
import type { InjectedItem } from './injectedItem';
44
import type { Main } from './main';
55

66
export type Injection = {
77
main: Main;
88

99
/**
10-
* list of insets of the current Composition.
10+
* list of injected items of the current Composition.
1111
*/
12-
insets?: Array<CompositionInset>;
12+
injectedItems?: Array<InjectedItem>;
1313
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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 { ResultsInjectedItemInfoResponse } from './resultsInjectedItemInfoResponse';
4+
5+
export type ResultsCompositionInfoResponse = {
6+
injectedItems: Array<ResultsInjectedItemInfoResponse>;
7+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
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 { ResultsCompositionInfoResponse } from './resultsCompositionInfoResponse';
4+
5+
export type ResultsCompositionsResponse = Record<string, any> & {
6+
compositions: { [key: string]: ResultsCompositionInfoResponse };
7+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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 ResultsInjectedItemAppliedRulesInfoResponse = {
4+
/**
5+
* Unique record identifier.
6+
*/
7+
objectID: string;
8+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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 { ResultsInjectedItemAppliedRulesInfoResponse } from './resultsInjectedItemAppliedRulesInfoResponse';
4+
5+
export type ResultsInjectedItemInfoResponse = Record<string, any> & {
6+
key: string;
7+
8+
appliedRules?: Array<ResultsInjectedItemAppliedRulesInfoResponse>;
9+
};
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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 { BaseSearchResponse } from './baseSearchResponse';
3+
import type { CompositionBaseSearchResponse } from './compositionBaseSearchResponse';
44
import type { SearchResults } from './searchResults';
55

6-
export type SearchResponse<T = Record<string, unknown>> = BaseSearchResponse & SearchResults<T>;
6+
export type SearchResponse<T = Record<string, unknown>> = CompositionBaseSearchResponse & SearchResults<T>;
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
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 { BaseSearchResponse } from './baseSearchResponse';
4+
import type { ResultsCompositionsResponse } from './resultsCompositionsResponse';
35
import type { SearchHits } from './searchHits';
46
import type { SearchPagination } from './searchPagination';
57

6-
export type SearchResultsItem<T = Record<string, unknown>> = SearchHits<T> & SearchPagination;
8+
export type SearchResultsItem<T = Record<string, unknown>> = BaseSearchResponse &
9+
SearchPagination &
10+
SearchHits<T> &
11+
ResultsCompositionsResponse;

0 commit comments

Comments
 (0)