UNPKG

typed-ocpp

Version:

A library for type-aware parsing, serialization and validation of OCPP 1.6, OCPP 2.0 and OCPP 2.1 messages

33 lines (32 loc) 1.11 kB
export declare const EMPTY_ARR: []; export declare const EMPTY_OBJ: {}; export interface WithErrorsArr { errors: string[]; } export interface ValidateFn<I, O extends I> extends WithErrorsArr { (value: I): value is O; errors: string[]; } export declare const assign: <TGT extends {}, SRC extends {}>(target: TGT, source: SRC) => TGT & SRC; export type ChargingRateUnit = 'W' | 'A'; export type NumberOfPhases = 1 | 2 | 3; export type Phases = { qty: NumberOfPhases; }; export interface ChargingLimits { charging: { min: number; max: number; phases: Phases; }; discharging: { min: number; max: number; phases: Phases; }; shouldDischarge: boolean; unit: ChargingRateUnit; } export declare const CHARGING_PROFILE_PURPOSES: readonly ["ChargingStationExternalConstraints", "ChargingStationMaxProfile", "TxDefaultProfile", "TxProfile", "PriorityCharging", "LocalGeneration"]; export type ChargingProfilePurpose = (typeof CHARGING_PROFILE_PURPOSES)[number]; export type PhaseVoltage = 240 | 230 | 220 | 127 | 120 | 115 | 110;