diff --git a/framework/commerce/index.tsx b/framework/commerce/index.tsx index 935e8610f..1a2ba878b 100644 --- a/framework/commerce/index.tsx +++ b/framework/commerce/index.tsx @@ -6,12 +6,7 @@ import { useMemo, useRef, } from 'react' -import { - Fetcher, - HookHandler, - MutationHandler, - MutationHook, -} from './utils/types' +import { Fetcher, HookHandler, MutationHook } from './utils/types' import type { FetchCartInput } from './cart/use-cart' import type { Cart, Wishlist, Customer, SearchProductsData } from './types' diff --git a/framework/commerce/utils/types.ts b/framework/commerce/utils/types.ts index 120d66366..98e4d0f34 100644 --- a/framework/commerce/utils/types.ts +++ b/framework/commerce/utils/types.ts @@ -74,24 +74,6 @@ export type HookHandler< fetcher?: HookFetcherFn } -export type MutationHandler< - // Data obj returned by the hook and fetch operation - Data, - // Input expected by the hook - Input extends { [k: string]: unknown } = {}, - // Input expected before doing a fetch operation - FetchInput extends { [k: string]: unknown } = {} -> = { - useHook?(context: { - input: Input - }): (context: { - input: FetchInput - fetch: (context: { input: FetchInput }) => Data | Promise - }) => Data | Promise - fetchOptions: HookFetcherOptions - fetcher?: HookFetcherFn -} - export type HookFunction< Input extends { [k: string]: unknown } | {}, T