Skip to content

Commit e1bd7ee

Browse files
refactor(specs): split injection schema (generated)
algolia/api-clients-automation#6224 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 a01ea4c commit e1bd7ee

15 files changed

Lines changed: 73 additions & 37 deletions

packages/composition/model/compositionSource.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/composition/model/index.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ export * from './compositionRuleConsequence';
2929
export * from './compositionRulesBatchParams';
3030
export * from './compositionRunAppliedRules';
3131
export * from './compositionRunSearchResponse';
32-
export * from './compositionSource';
33-
export * from './compositionSourceSearch';
3432
export * from './compositionsSearchResponse';
3533
export * from './condition';
3634
export * from './deduplication';
@@ -41,11 +39,9 @@ export * from './distinct';
4139
export * from './errorBase';
4240
export * from './exactOnSingleWordQuery';
4341
export * from './exhaustive';
44-
export * from './external';
4542
export * from './externalInjectedItem';
4643
export * from './externalInjection';
4744
export * from './externalOrdering';
48-
export * from './externalSource';
4945
export * from './facetFilters';
5046
export * from './facetHits';
5147
export * from './facetOrdering';
@@ -59,15 +55,24 @@ export * from './hitMetadata';
5955
export * from './hitRankingInfo';
6056
export * from './ignorePlurals';
6157
export * from './indexSettingsFacets';
62-
export * from './injectedItem';
58+
export * from './injectedItemExternal';
59+
export * from './injectedItemExternalSource';
6360
export * from './injectedItemHitsMetadata';
6461
export * from './injectedItemMetadata';
62+
export * from './injectedItemSearch';
63+
export * from './injectedItemSearchSource';
6564
export * from './injectedItemSource';
6665
export * from './injection';
66+
export * from './injectionInjectedItem';
67+
export * from './injectionMain';
68+
export * from './injectionMainRecommendSource';
69+
export * from './injectionMainSearchSource';
70+
export * from './injectionMainSource';
6771
export * from './insideBoundingBox';
6872
export * from './listCompositionsResponse';
69-
export * from './main';
7073
export * from './mainInjectionQueryParameters';
74+
export * from './mainRecommend';
75+
export * from './mainSearch';
7176
export * from './matchedGeoLocation';
7277
export * from './matchLevel';
7378
export * from './multifeed';
@@ -96,7 +101,6 @@ export * from './resultsInjectedItemInfoResponse';
96101
export * from './rulesBatchCompositionAction';
97102
export * from './rulesMultipleBatchRequest';
98103
export * from './rulesMultipleBatchResponse';
99-
export * from './search';
100104
export * from './searchCompositionRulesParams';
101105
export * from './searchCompositionRulesResponse';
102106
export * from './searchFields';
@@ -107,7 +111,6 @@ export * from './searchForFacetValuesResults';
107111
export * from './searchResponse';
108112
export * from './searchResults';
109113
export * from './searchResultsItem';
110-
export * from './searchSource';
111114
export * from './snippetResult';
112115
export * from './snippetResultOption';
113116
export * from './sortRemainingBy';

packages/composition/model/external.ts renamed to packages/composition/model/injectedItemExternal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import type { BaseInjectionQueryParameters } from './baseInjectionQueryParameters';
44
import type { ExternalOrdering } from './externalOrdering';
55

6-
export type External = {
6+
export type InjectedItemExternal = {
77
/**
88
* Composition Index name.
99
*/
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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 { External } from './external';
3+
import type { InjectedItemExternal } from './injectedItemExternal';
44

55
/**
66
* Injected items will originate from externally provided objectIDs (that must exist in the index) given at runtime in the run request payload.
77
*/
8-
export type ExternalSource = {
9-
external: External;
8+
export type InjectedItemExternalSource = {
9+
external: InjectedItemExternal;
1010
};

packages/composition/model/search.ts renamed to packages/composition/model/injectedItemSearch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import type { BaseInjectionQueryParameters } from './baseInjectionQueryParameters';
44

5-
export type Search = {
5+
export type InjectedItemSearch = {
66
/**
77
* Composition Index name.
88
*/
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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 { Search } from './search';
3+
import type { InjectedItemSearch } from './injectedItemSearch';
44

55
/**
66
* Injected items will originate from a search request performed on the specified index.
77
*/
8-
export type SearchSource = {
9-
search: Search;
8+
export type InjectedItemSearchSource = {
9+
search: InjectedItemSearch;
1010
};
Lines changed: 3 additions & 3 deletions
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 { ExternalSource } from './externalSource';
4-
import type { SearchSource } from './searchSource';
3+
import type { InjectedItemExternalSource } from './injectedItemExternalSource';
4+
import type { InjectedItemSearchSource } from './injectedItemSearchSource';
55

6-
export type InjectedItemSource = SearchSource | ExternalSource;
6+
export type InjectedItemSource = InjectedItemSearchSource | InjectedItemExternalSource;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
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 { Deduplication } from './deduplication';
4-
import type { InjectedItem } from './injectedItem';
5-
import type { Main } from './main';
4+
import type { InjectionInjectedItem } from './injectionInjectedItem';
5+
import type { InjectionMain } from './injectionMain';
66

77
export type Injection = {
8-
main: Main;
8+
main: InjectionMain;
99

1010
/**
1111
* list of injected items of the current Composition.
1212
*/
13-
injectedItems?: Array<InjectedItem> | undefined;
13+
injectedItems?: Array<InjectionInjectedItem> | undefined;
1414

1515
deduplication?: Deduplication | undefined;
1616
};

packages/composition/model/injectedItem.ts renamed to packages/composition/model/injectionInjectedItem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import type { InjectedItemMetadata } from './injectedItemMetadata';
44
import type { InjectedItemSource } from './injectedItemSource';
55

6-
export type InjectedItem = {
6+
export type InjectionInjectedItem = {
77
/**
88
* injected Item unique identifier.
99
*/
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 { InjectionMainSource } from './injectionMainSource';
4+
5+
/**
6+
* Main defines the organic result set of the injection.
7+
*/
8+
export type InjectionMain = {
9+
source?: InjectionMainSource | undefined;
10+
};

0 commit comments

Comments
 (0)