@commercetools-frontend/sdk
Version:
Tools for declarative fetching
11 lines (10 loc) • 565 B
TypeScript
/// <reference types="commercetools__sdk-client" />
import type { Dispatch, MiddlewareAPI } from 'redux';
import type { TSdkAction } from '../types';
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>;