import { Component, JSX } from 'react'; import type { SuccessResult, HttpErrorType } from '@commercetools/sdk-client'; import type { TSdkAction } from "../../types.js"; type TSdkError = Error | HttpErrorType; type TActionCreatorArgs = unknown[]; type State = { isWaitingForCompletionOfFirstRequest: boolean; requestsInFlight: number; result?: SuccessResult['body']; error?: TSdkError; }; type TRenderOptions = { isLoading: boolean; refresh: () => Promise; result?: State['result']; error?: State['error']; }; type DispatchProps = { dispatch: (action: TSdkAction) => Promise; }; type OwnProps = { actionCreator: (...args: TActionCreatorArgs) => TSdkAction; actionCreatorArgs?: TActionCreatorArgs; shouldRefetch?: (prevArgs: TActionCreatorArgs, nextArgs: TActionCreatorArgs) => boolean; onSuccess?: (result: SuccessResult['body']) => void; onError?: (error: TSdkError) => void; render: (options: TRenderOptions) => JSX.Element; }; export type Props = DispatchProps & OwnProps; type StaticErrorHandler = (error: TSdkError) => void; export declare class SdkGet extends Component { static displayName: string; static errorHandler: StaticErrorHandler; state: { isWaitingForCompletionOfFirstRequest: boolean; requestsInFlight: number; result: undefined; error: undefined; }; isComponentMounted: boolean; changeRequestsInFlight: (delta: number) => void; componentDidMount(): void; componentDidUpdate(prevProps: Props): void; componentWillUnmount(): void; fetch: ({ dispatch, actionCreator, actionCreatorArgs, onSuccess, onError, }: Pick) => Promise; refresh: () => Promise; render(): JSX.Element; } declare const _default: import("react-redux").ConnectedComponent JSX.Element; ref?: import("react").Ref | undefined; key?: import("react").Key | null | undefined; onError?: ((error: TSdkError) => void) | undefined; css?: import("@emotion/react").Interpolation; actionCreator: (...args: TActionCreatorArgs) => TSdkAction; actionCreatorArgs?: TActionCreatorArgs | undefined; shouldRefetch?: ((prevArgs: TActionCreatorArgs, nextArgs: TActionCreatorArgs) => boolean) | undefined; onSuccess?: ((result: SuccessResult["body"]) => void) | undefined; context?: import("react").Context | null> | undefined; store?: import("redux").Store | undefined; }>; export default _default;