import { ChargePointErrorCode } from './ChargePointErrorCode';
import { ChargePointStatus } from './ChargePointStatus';
import { ChargingProfile } from './ChargingProfile';
-import OCPPError from '../../../charging-station/OcppError';
+import { StandardParametersKey } from './Configuration';
-export default interface Requests {
- [id: string]: [(payload?, requestPayload?) => void, (error?: OCPPError) => void, Record<string, unknown>];
+export enum RequestCommand {
+ BOOT_NOTIFICATION = 'BootNotification',
+ HEARTBEAT = 'Heartbeat',
+ STATUS_NOTIFICATION = 'StatusNotification',
+ CHANGE_CONFIGURATION = 'ChangeConfiguration',
+ AUTHORIZE = 'Authorize',
+ START_TRANSACTION = 'StartTransaction',
+ STOP_TRANSACTION = 'StopTransaction',
+ METERVALUES = 'MeterValues'
+}
+
+export enum IncomingRequestCommand {
+ RESET = 'Reset',
+ CLEAR_CACHE = 'ClearCache',
+ CHANGE_AVAILABILITY = 'ChangeAvailability',
+ UNLOCK_CONNECTOR = 'UnlockConnector',
+ GET_CONFIGURATION = 'GetConfiguration',
+ CHANGE_CONFIGURATION = 'ChangeConfiguration',
+ SET_CHARGING_PROFILE = 'SetChargingProfile',
+ REMOTE_START_TRANSACTION = 'RemoteStartTransaction',
+ REMOTE_STOP_TRANSACTION = 'RemoteStopTransaction'
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
-export interface HeartbeatRequest {}
+export interface HeartbeatRequest { }
export interface BootNotificationRequest {
chargeBoxSerialNumber?: string;
}
export interface ChangeConfigurationRequest {
- key: string;
+ key: string | StandardParametersKey;
value: string;
}
}
export interface GetConfigurationRequest {
- key?: string[];
+ key?: string | StandardParametersKey[];
}
export enum ResetType {
connectorId: number;
csChargingProfiles: ChargingProfile;
}
+
+export enum AvailabilityType {
+ INOPERATIVE = 'Inoperative',
+ OPERATIVE = 'Operative'
+}
+
+export interface ChangeAvailabilityRequest {
+ connectorId: number;
+ type: AvailabilityType;
+}