UNPKG

@commercetools-frontend/sdk

Version:
10 lines (9 loc) 516 B
import type { Dispatch, MiddlewareAPI } from 'redux'; import type { TSdkAction } from "../types.js"; export default function createSdkMiddleware({ getCorrelationId, getProjectKey, getAdditionalHeaders, }: { getCorrelationId: () => string; getProjectKey: () => string | undefined; getAdditionalHeaders: () => { [key: string]: string; } | undefined; }): ({ dispatch }: MiddlewareAPI) => (next: Dispatch<TSdkAction>) => (action: TSdkAction) => Promise<import("@commercetools/sdk-client").Json>;