Skip to content

Commit

Permalink
UniversalControllerDefinitionWithoutProps -> NonRecommendationControl…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexprudhomme committed Nov 26, 2024
1 parent 3399b4c commit 2a2aaee
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 16 deletions.
4 changes: 2 additions & 2 deletions packages/headless/src/app/commerce-ssr-engine/types/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@ export type RecommendationOnlyControllerDefinitionWithProps<
> = ControllerDefinitionWithProps<TController, TProps> &
RecommendationOnlyController;

export type UniversalControllerDefinitionWithoutProps<
export type NonRecommendationControllerDefinitionWithoutProps<
TController extends Controller,
> = ControllerDefinitionWithoutProps<TController> & UniversalController;

export type UniversalControllerDefinitionWithProps<
export type NonRecommendationControllerDefinitionWithProps<
TController extends Controller,
TProps,
> = ControllerDefinitionWithProps<TController, TProps> & UniversalController;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {UniversalControllerDefinitionWithProps} from '../../../../app/commerce-ssr-engine/types/common.js';
import {NonRecommendationControllerDefinitionWithProps} from '../../../../app/commerce-ssr-engine/types/common.js';
import {Cart, buildCart, CartInitialState} from './headless-cart.js';

export type {CartState, CartItem, CartProps} from './headless-cart.js';
Expand All @@ -9,7 +9,10 @@ export interface CartBuildProps {
}

export interface CartDefinition
extends UniversalControllerDefinitionWithProps<Cart, CartBuildProps> {}
extends NonRecommendationControllerDefinitionWithProps<
Cart,
CartBuildProps
> {}

/**
* Defines a `Cart` controller instance.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {UniversalControllerDefinitionWithProps} from '../../../app/commerce-ssr-engine/types/common.js';
import {NonRecommendationControllerDefinitionWithProps} from '../../../app/commerce-ssr-engine/types/common.js';
import {
Context,
buildContext,
Expand All @@ -11,7 +11,10 @@ export type {ContextState, Context, ContextProps} from './headless-context.js';
export type {View, UserLocation, ContextOptions};

export interface ContextDefinition
extends UniversalControllerDefinitionWithProps<Context, ContextOptions> {}
extends NonRecommendationControllerDefinitionWithProps<
Context,
ContextOptions
> {}

/**
* Defines a `Context` controller instance.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {UniversalControllerDefinitionWithoutProps} from '../../../app/commerce-ssr-engine/types/common.js';
import {NonRecommendationControllerDefinitionWithoutProps} from '../../../app/commerce-ssr-engine/types/common.js';
import {
FieldSuggestionsGenerator,
buildFieldSuggestionsGenerator,
Expand All @@ -17,7 +17,7 @@ export type {GeneratedFieldSuggestionsControllers} from './headless-field-sugges
export type {FieldSuggestionsGenerator};

export interface FieldSuggestionsGeneratorDefinition
extends UniversalControllerDefinitionWithoutProps<FieldSuggestionsGenerator> {}
extends NonRecommendationControllerDefinitionWithoutProps<FieldSuggestionsGenerator> {}

/**
* Defines the `FieldSuggestionsGenerator` controller for the purpose of server-side rendering.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {UniversalControllerDefinitionWithoutProps} from '../../../app/commerce-ssr-engine/types/common.js';
import {NonRecommendationControllerDefinitionWithoutProps} from '../../../app/commerce-ssr-engine/types/common.js';
import {
InstantProducts,
InstantProductsProps,
Expand All @@ -12,7 +12,7 @@ export type {
export type {InstantProducts, InstantProductsProps};

export interface InstantProductsDefinition
extends UniversalControllerDefinitionWithoutProps<InstantProducts> {}
extends NonRecommendationControllerDefinitionWithoutProps<InstantProducts> {}

/**
* Defines the `InstantProducts` controller for the purpose of server-side rendering.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {CommerceEngine} from '../../../app/commerce-engine/commerce-engine.js';
import {UniversalControllerDefinitionWithoutProps} from '../../../app/commerce-ssr-engine/types/common.js';
import {NonRecommendationControllerDefinitionWithoutProps} from '../../../app/commerce-ssr-engine/types/common.js';
import {
buildController,
Controller,
Expand All @@ -10,7 +10,7 @@ import {
} from './headless-product-view.js';

export interface ProductViewDefinition
extends UniversalControllerDefinitionWithoutProps<ProductView> {}
extends NonRecommendationControllerDefinitionWithoutProps<ProductView> {}

/**
* Defines a `ProductView` controller instance.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {UniversalControllerDefinitionWithoutProps} from '../../../app/commerce-ssr-engine/types/common.js';
import {NonRecommendationControllerDefinitionWithoutProps} from '../../../app/commerce-ssr-engine/types/common.js';
import {
RecentQueriesList,
RecentQueriesListProps,
Expand All @@ -13,7 +13,7 @@ export type {
export type {RecentQueriesList, RecentQueriesListProps};

export interface RecentQueriesListDefinition
extends UniversalControllerDefinitionWithoutProps<RecentQueriesList> {}
extends NonRecommendationControllerDefinitionWithoutProps<RecentQueriesList> {}

/**
* Defines the `RecentQueriesList` controller for the purpose of server-side rendering.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {UniversalControllerDefinitionWithoutProps} from '../../../app/commerce-ssr-engine/types/common.js';
import {NonRecommendationControllerDefinitionWithoutProps} from '../../../app/commerce-ssr-engine/types/common.js';
import {StandaloneSearchBoxProps} from '../../standalone-search-box/headless-standalone-search-box.js';
import {
StandaloneSearchBox,
Expand All @@ -10,7 +10,7 @@ export type {StandaloneSearchBoxState} from './headless-standalone-search-box.js
export type {StandaloneSearchBox, StandaloneSearchBoxProps};

export interface StandaloneSearchBoxDefinition
extends UniversalControllerDefinitionWithoutProps<StandaloneSearchBox> {}
extends NonRecommendationControllerDefinitionWithoutProps<StandaloneSearchBox> {}

/**
* Defines the `StandaloneSearchBox` controller for the purpose of server-side rendering.
Expand Down

0 comments on commit 2a2aaee

Please sign in to comment.