export type TokenProvider = () => Promise | string; export type Ports = { http?: number; https?: number; services?: Record; }; export type ServiceLocator = (serviceId: string) => string; /** * Global configuration for the client kit. */ export interface GlobularConfig { protocol: 'http' | 'https'; domain: string; ports?: Ports; application?: string; tokenProvider?: TokenProvider; /** Extra headers that should be sent with HTTP helpers and gRPC metadata */ extraHeaders?: Record; /** Optional service locator to compute endpoint by service id */ serviceLocator?: ServiceLocator; } /** * Default config can be overridden at app bootstrap with setConfig(). */ export declare const config: GlobularConfig; export declare function setConfig(next: Partial): void; /** * Default service locator: * - if ports.services has an entry for the service id, use that port * - else use protocol default port * - endpoint shape: `${protocol}://${domain}:${port}` */ export declare const defaultServiceLocator: ServiceLocator;