import type { BotConfig } from "../config/config.js"; import { type GatewayClientMode, type GatewayClientName } from "../utils/message-channel.js"; import { type OperatorScope } from "./method-scopes.js"; type CallGatewayBaseOptions = { url?: string; token?: string; password?: string; tlsFingerprint?: string; config?: BotConfig; method: string; params?: unknown; expectFinal?: boolean; timeoutMs?: number; clientName?: GatewayClientName; clientDisplayName?: string; clientVersion?: string; platform?: string; mode?: GatewayClientMode; instanceId?: string; minProtocol?: number; maxProtocol?: number; requiredMethods?: string[]; /** * Overrides the config path shown in connection error details. * Does not affect config loading; callers still control auth via opts.token/password/env/config. */ configPath?: string; }; export type CallGatewayScopedOptions = CallGatewayBaseOptions & { scopes: OperatorScope[]; }; export type CallGatewayCliOptions = CallGatewayBaseOptions & { scopes?: OperatorScope[]; }; export type CallGatewayOptions = CallGatewayBaseOptions & { scopes?: OperatorScope[]; }; export type GatewayConnectionDetails = { url: string; urlSource: string; bindDetail?: string; remoteFallbackNote?: string; message: string; }; export type ExplicitGatewayAuth = { token?: string; password?: string; }; export declare function resolveExplicitGatewayAuth(opts?: ExplicitGatewayAuth): ExplicitGatewayAuth; export declare function ensureExplicitGatewayAuth(params: { urlOverride?: string; urlOverrideSource?: "cli" | "env"; explicitAuth?: ExplicitGatewayAuth; resolvedAuth?: ExplicitGatewayAuth; errorHint: string; configPath?: string; }): void; export declare function buildGatewayConnectionDetails(options?: { config?: BotConfig; url?: string; configPath?: string; urlSource?: "cli" | "env"; }): GatewayConnectionDetails; export declare function resolveGatewayCredentialsWithSecretInputs(params: { config: BotConfig; explicitAuth?: ExplicitGatewayAuth; urlOverride?: string; env?: NodeJS.ProcessEnv; }): Promise<{ token?: string; password?: string; }>; export declare function callGatewayScoped>(opts: CallGatewayScopedOptions): Promise; export declare function callGatewayCli>(opts: CallGatewayCliOptions): Promise; export declare function callGatewayLeastPrivilege>(opts: CallGatewayBaseOptions): Promise; export declare function callGateway>(opts: CallGatewayOptions): Promise; export declare function randomIdempotencyKey(): `${string}-${string}-${string}-${string}-${string}`; export {};