import { BrandProfile } from './brandProfiles.js'; export type LocalStartResult = { ok: true; transactionId: number | null; } | { ok: false; reason: 'not_connected' | 'connector_not_found' | 'already_charging' | 'reservation_conflict' | 'authorize_rejected'; }; export type LocalStopResult = { ok: true; } | { ok: false; reason: 'connector_not_found' | 'no_active_transaction'; }; export type StopTransactionReason = 'DeAuthorized' | 'EmergencyStop' | 'EVDisconnected' | 'HardReset' | 'Local' | 'Other' | 'PowerLoss' | 'Reboot' | 'Remote' | 'SoftReset'; export interface BootOptions { chargeBoxSerialNumber: string; chargePointModel: string; chargePointSerialNumber: string; chargePointVendor: string; firmwareVersion: string; } export declare enum ConnectorState { Unavailable = "Unavailable", Available = "Available", Preparing = "Preparing", Charging = "Charging", Finishing = "Finishing", Faulted = "Faulted" } export declare enum ChargePointErrorCode { ConnectorLockFailure = "ConnectorLockFailure", EVCommunicationError = "EVCommunicationError", GroundFailure = "GroundFailure", HighTemperature = "HighTemperature", InternalError = "InternalError", LocalListConflict = "LocalListConflict", NoError = "NoError", OtherError = "OtherError", OverCurrentFailure = "OverCurrentFailure", OverVoltage = "OverVoltage", PowerMeterFailure = "PowerMeterFailure", PowerSwitchFailure = "PowerSwitchFailure", ReaderFailure = "ReaderFailure", ResetFailure = "ResetFailure", UnderVoltage = "UnderVoltage", WeakSignal = "WeakSignal" } type OcppPayload = Record; export declare class OcppClient { private readonly chargerId; private bootOpts; private readonly csmsBaseUrl; private readonly brandProfile; private readonly log; private readonly logTraffic; private ws; private readonly pending; private hbTimer; private heartbeatPeriod; private meterPeriod; reconnectInterval: number; private readonly reconnectMaxInterval; private readonly reconnectJitterRatio; private reconnectAttempts; private isReconnecting; private msgCounter; private shouldReconnect; private isShuttingDown; private readonly connectors; private connected; private stationState; private lastMessageAt; private rebootDelayMs; private power; private readonly configuration; private chargerPassword; private readonly firmwareManager; constructor(chargerId: string, bootOpts: BootOptions, csmsBaseUrl: string, connectorCount?: number, brandProfile?: BrandProfile | null); private clearReservation; private canStartWithIdTag; private connectPromise; private resolveConnectPromise; private rejectConnectPromise; isConnected(): boolean; getState(): ConnectorState; getStateAll(): { id: number; state: ConnectorState; errorCode: ChargePointErrorCode; transactionId: number | null; }[]; getTransactionId(connectorId?: number): number | null; getPower(): { watts: number; amps: number; volts: number; }; setPower(amps?: number, volts?: number): void; getHeartbeatPeriodMs(): number; getLastMessageAt(): number | null; getFirmwareVersion(): string; isActionAllowed(action: string): boolean; isConfigKeyAllowed(key: string): boolean; setChargerPassword(password: string | undefined): void; connect(): Promise; disconnectWs(): Promise; reconnectWs(): Promise; shutdown(): Promise; private reconnect; private rejectAllPendingRequests; private performReboot; localReset(type?: 'Hard' | 'Soft'): Promise; private newId; private rawSend; private sendCall; private sendCallResult; private sendCallError; private isValidFrame; private validateCallPayload; private statusPayload; private watts; private handleIncoming; private handleRemoteStart; private handleRemoteStop; private handleGetConfiguration; private handleChangeConfiguration; private applyConfiguration; private handleChangeAvailability; private handleUnlockConnector; private handleUpdateFirmware; private handleGetDiagnostics; private handleTriggerMessage; private handleReserveNow; private handleCancelReservation; private startMeterLoop; private stopMeterLoop; private startHeartbeat; private stopTimers; private safeCall; localStart(connectorId?: number, idTag?: string): Promise; stopConnector(connectorId?: number): Promise; setConnectorStatus(connectorId: number | undefined, state: ConnectorState): Promise; setConnectorError(connectorId: number, errorCode: ChargePointErrorCode): Promise; private doStopConnector; authorize(idTag: string): Promise<'Accepted' | 'Rejected' | 'Invalid' | 'Blocked' | 'Expired' | 'ConcurrentTx'>; dataTransfer(vendorId: string, messageId?: string, data?: string): Promise; setFirmwareTimings(schedule: { downloadMs?: number; installMs?: number; }): void; sendBootNotification(): Promise; sendHeartbeat(): Promise; sendStatusNotification(connectorId: number, status: ConnectorState, errorCode?: ChargePointErrorCode): Promise; sendMeterValues(connectorId: number, transactionId?: number): Promise; startTransaction(connectorId?: number, idTag?: string): Promise; stopTransaction(connectorId?: number, reason?: StopTransactionReason): Promise; diagnosticsStatusNotification(status: 'Idle' | 'Uploaded' | 'UploadFailed'): Promise; firmwareStatusNotification(status: 'Downloading' | 'Downloaded' | 'Installing' | 'Installed' | 'DownloadFailed' | 'InstallationFailed'): Promise; private resolveFirmwareVersion; private parseVersionNumbers; private isVersionGreater; private compareVersions; private isVersionFamily; private validateNg9xxFirmwarePath; applyGetConfiguration(payload: { key?: string[]; }): { configurationKey: { key: string; readonly: boolean; value: string; }[]; unknownKey: string[]; }; applyChangeConfiguration(payload: { key: string; value: string; }): { status: "Rejected"; } | { status: "Accepted"; }; applyChangeAvailability(payload: { connectorId: number; type: 'Operative' | 'Inoperative'; }): { status: "Accepted"; } | { status: "Rejected"; }; applyClearCache(): { status: "Accepted"; }; applyTriggerMessage(payload: { requestedMessage: string; connectorId?: number; }): Promise<{ status: "Rejected"; error: string; } | { status: "Accepted"; error?: undefined; }>; applyRemoteStart(payload: { connectorId?: number; idTag: string; }): Promise<{ status: "Rejected"; } | { status: "Accepted"; }>; applyRemoteStop(payload: { transactionId?: number; connectorId?: number; }): Promise<{ status: "Rejected"; } | { status: "Accepted"; }>; applyReset(payload: { type?: 'Soft' | 'Hard'; }): Promise<{ status: "Accepted"; }>; applyUnlockConnector(payload: { connectorId: number; }): { status: "UnlockFailed"; } | { status: "Unlocked"; }; applyUpdateFirmware(payload: { location: string; retrieveDate: string; retries?: number; retryInterval?: number; checksum?: string; version?: string; }): { status: "Rejected"; error: string; message: string; } | { status: "Accepted" | "Rejected"; error?: undefined; message?: undefined; }; applyGetDiagnostics(payload: { location?: string; retries?: number; retryInterval?: number; startTime?: string; stopTime?: string; }): { status: "Rejected"; error: string; message: string; fileName?: undefined; } | { status: "Accepted"; fileName: string; error?: undefined; message?: undefined; }; applyReserveNow(payload: { connectorId?: number; expiryDate?: string; idTag?: string; reservationId?: number; }): { status: "Rejected"; error: string; message: string; } | { status: "Rejected"; error?: undefined; message?: undefined; } | { status: "Occupied"; error?: undefined; message?: undefined; } | { status: "Accepted"; error?: undefined; message?: undefined; }; applyCancelReservation(payload: { reservationId?: number; }): { status: "Rejected"; error: string; message: string; } | { status: "Accepted" | "Rejected"; error?: undefined; message?: undefined; }; } export {};