-import { ClientRequestArgs } from 'http';
+import type { ClientRequestArgs } from 'node:http';
-import { ClientOptions } from 'ws';
+import type { ClientOptions } from 'ws';
-import { AutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator';
-import ChargingStationOcppConfiguration from './ChargingStationOcppConfiguration';
-import { ConnectorStatus } from './ConnectorStatus';
-import { OCPPProtocol } from './ocpp/OCPPProtocol';
-import { OCPPVersion } from './ocpp/OCPPVersion';
-import { IncomingRequestCommand, RequestCommand } from './ocpp/Requests';
+import type { AutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator';
+import type { ChargingStationOcppConfiguration } from './ChargingStationOcppConfiguration';
+import type { ConnectorStatus } from './ConnectorStatus';
+import type { EvseTemplate } from './Evse';
+import type { OCPPProtocol } from './ocpp/OCPPProtocol';
+import type { OCPPVersion } from './ocpp/OCPPVersion';
+import type {
+ FirmwareStatus,
+ IncomingRequestCommand,
+ MessageTrigger,
+ RequestCommand,
+} from './ocpp/Requests';
export enum CurrentType {
AC = 'AC',
export type WsOptions = ClientOptions & ClientRequestArgs;
+export interface FirmwareUpgrade {
+ versionUpgrade?: {
+ patternGroup?: number;
+ step?: number;
+ };
+ reset?: boolean;
+ failureStatus?: FirmwareStatus;
+}
+
interface CommandsSupport {
incomingCommands: Record<IncomingRequestCommand, boolean>;
outgoingCommands?: Record<RequestCommand, boolean>;
}
-export default interface ChargingStationTemplate {
+enum x509CertificateType {
+ V2GRootCertificate = 'V2GRootCertificate',
+ MORootCertificate = 'MORootCertificate',
+ CSMSRootCertificate = 'CSMSRootCertificate',
+ ManufacturerRootCertificate = 'ManufacturerRootCertificate',
+ ChargingStationCertificate = 'ChargingStationCertificate',
+ V2GCertificate = 'V2GCertificate',
+}
+
+export interface ChargingStationTemplate {
templateHash?: string;
supervisionUrls?: string | string[];
supervisionUrlOcppConfiguration?: boolean;
ocppStrictCompliance?: boolean;
ocppPersistentConfiguration?: boolean;
stationInfoPersistentConfiguration?: boolean;
+ automaticTransactionGeneratorPersistentConfiguration?: boolean;
wsOptions?: WsOptions;
- authorizationFile?: string;
+ idTagsFile?: string;
baseName: string;
nameSuffix?: string;
fixedName?: boolean;
chargePointVendor: string;
chargePointSerialNumberPrefix?: string;
chargeBoxSerialNumberPrefix?: string;
+ firmwareVersionPattern?: string;
firmwareVersion?: string;
+ firmwareUpgrade?: FirmwareUpgrade;
iccid?: string;
imsi?: string;
meterSerialNumberPrefix?: string;
meterType?: string;
- power: number | number[];
+ power?: number | number[];
+ powerUnit?: PowerUnits;
powerSharedByConnectors?: boolean;
- powerUnit: PowerUnits;
currentOutType?: CurrentType;
voltageOut?: Voltage;
numberOfPhases?: number;
reconnectExponentialDelay?: boolean;
registrationMaxRetries?: number;
enableStatistics?: boolean;
- mayAuthorizeAtRemoteStart?: boolean;
+ remoteAuthorization?: boolean;
+ /** @deprecated Replaced by remoteAuthorization */
+ mustAuthorizeAtRemoteStart?: boolean;
+ /** @deprecated Replaced by ocppStrictCompliance */
payloadSchemaValidation?: boolean;
amperageLimitationOcppKey?: string;
amperageLimitationUnit?: AmpereUnits;
outOfOrderEndMeterValues?: boolean;
meteringPerTransaction?: boolean;
transactionDataMeterValues?: boolean;
+ stopTransactionsOnStopped?: boolean;
mainVoltageMeterValues?: boolean;
phaseLineToLineVoltageMeterValues?: boolean;
customValueLimitationMeterValues?: boolean;
commandsSupport?: CommandsSupport;
+ messageTriggerSupport?: Record<MessageTrigger, boolean>;
Configuration?: ChargingStationOcppConfiguration;
AutomaticTransactionGenerator?: AutomaticTransactionGeneratorConfiguration;
- Connectors: Record<string, ConnectorStatus>;
+ Evses?: Record<string, EvseTemplate>;
+ Connectors?: Record<string, ConnectorStatus>;
+ x509Certificates?: Record<x509CertificateType, string>;
}