import { Manifest, SDK } from '@rsdoctor/types'; import React from 'react'; export type InferServerAPIBody = SDK.ServerAPI.InferRequestBodyType extends void ? { body?: any; } : { body: SDK.ServerAPI.InferRequestBodyType; }; type ServerAPIProviderProps = { manifestLoader?: () => Promise; api: T; children: (response: SDK.ServerAPI.InferResponseType) => React.JSX.Element; fallbackComponent?: React.FC; showSkeleton?: boolean; } & InferServerAPIBody; /** * this component will request server api to the sdk of Rsdoctor in local development. * otherwise it will fallback to load full manifest for the data. * * @example usage * * {(response) => { * * }} * */ export declare const ServerAPIProvider: (props: ServerAPIProviderProps) => React.JSX.Element | null; export declare function withServerAPI({ Component, api, responsePropName, body: bodyInRoot, fallbackComponent, showSkeleton, }: { Component: React.FC; api: A; responsePropName: P; fallbackComponent?: React.FC; showSkeleton?: boolean; } & Partial>>): React.FC & Partial>>; export {};