import { type Socket, type ManagerOptions, type SocketOptions } from 'socket.io-client'; import type { CloudTwinResponse } from '../types/twin.types'; import { type CloudAppToken, type CloudAppFetch } from './cloud-app-token.service'; export interface CloudAppConnectResult { socket: Socket; initialTwins: CloudTwinResponse[] | undefined; } export interface CloudAppConnectionParams { appRegistrationId: string; appSecret: string; coreApiUrl: string; phyhubUrl: string; refreshLeadMs?: number; fetch?: CloudAppFetch; ioFactory?: (url: string, opts: Partial) => Socket; logger?: Pick; } export declare class CloudAppConnection { private readonly params; private socket; private cachedToken; private refreshTimer; private connected; constructor(params: CloudAppConnectionParams); connect(): Promise; disconnect(): void; getToken(): CloudAppToken | null; getSocket(): Socket | null; private fetchToken; private scheduleRefresh; private runRefresh; private refreshIfStale; } //# sourceMappingURL=cloud-app-connection.service.d.ts.map