UNPKG

@citrineos/base

Version:

The base module for OCPP v2.0.1 including all interfaces. This module is not intended to be used directly, but rather as a dependency for other modules.

32 lines (31 loc) 1.1 kB
/** * Cache namespace, used for grouping cache entries */ export declare enum CacheNamespace { CentralSystem = "csms", ChargingStation = "cs", TenantPathMapping = "tpm", Transactions = "tx", Connections = "conn", Protocol = "prtcl", Other = "other" } export declare const PATH_DELIMITER = ":"; export declare const getCacheTenantPathMappingKey: (serverId: string, path: string) => string; export declare const IDENTIFIER_DELIMITER = ":"; export declare const createIdentifier: (tenantId: number, ...args: any[]) => string; export declare const getTenantIdFromIdentifier: (identifier: string) => number; export declare const getStationIdFromIdentifier: (identifier: string) => string; /** * Used in the Connections Namespace as the value, to represent a websocket connection * Is stringified from JSON when stored in the cache */ export interface IWebsocketConnection { id: string; /** * Stored as ISO string in the cache, converted to Date when retrieved */ timeConnected: string; protocol: string; allowUnknownChargingStations: boolean; }