import { ReactNode } from 'react'; import { ApolloClient } from '@apollo/client/core'; import { Gateway } from '../config'; export interface GatewayContextValue { /** Apollo client for the workspace gateway (port 4003) */ workspaceClient: ApolloClient; /** Apollo client for the global gateway (port 4000) */ globalClient: ApolloClient; /** Get client by gateway type */ getClient: (gateway: Gateway) => ApolloClient; } export interface GatewayProviderProps { children: ReactNode; value: GatewayContextValue; } /** * GatewayProvider — wraps the React tree with gateway client access. * * This is called ONCE by the app shell's MultiGatewayProvider. * Microfrontends should never render this directly. */ export declare function GatewayProvider({ children, value }: GatewayProviderProps): import("react/jsx-runtime").JSX.Element; /** * Access both gateway clients. * * @example * ```ts * const { workspaceClient, globalClient } = useGateway(); * ``` */ export declare function useGateway(): GatewayContextValue; /** * Get a specific gateway's Apollo client. * * @example * ```ts * const globalClient = useGatewayClient('global'); * const { data } = useQuery(MY_QUERY, { client: globalClient }); * ``` */ export declare function useGatewayClient(gateway: Gateway): ApolloClient; /** * Same as `useGateway` but returns `null` instead of throwing when no * `GatewayProvider` is mounted. Used by cross-cutting components (tour * triggers, shell chrome) that may render in trees where the provider is * intentionally absent — tests, standalone previews, or embed hosts. */ export declare function useSafeGateway(): GatewayContextValue | null; /** * Same as `useGatewayClient` but returns `null` instead of throwing when no * `GatewayProvider` is mounted. Callers should short-circuit their data * fetching when this returns null. */ export declare function useSafeGatewayClient(gateway: Gateway): ApolloClient | null; //# sourceMappingURL=GatewayContext.d.ts.map