Add missing file in types directory
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 1.6 / Requests.ts
index 9ed48049a52cb70915cf8c1955f914d42a236453..d83417b04df20b5fa7e84f8db319151a818c073e 100644 (file)
@@ -1,7 +1,9 @@
 import { ChargingProfilePurposeType, OCPP16ChargingProfile } from './ChargingProfile';
 
+import { EmptyObject } from '../../EmptyObject';
 import { OCPP16ChargePointErrorCode } from './ChargePointErrorCode';
 import { OCPP16ChargePointStatus } from './ChargePointStatus';
+import { OCPP16DiagnosticsStatus } from './DiagnosticsStatus';
 import { OCPP16StandardParametersKey } from './Configuration';
 
 export enum OCPP16RequestCommand {
@@ -12,7 +14,8 @@ export enum OCPP16RequestCommand {
   AUTHORIZE = 'Authorize',
   START_TRANSACTION = 'StartTransaction',
   STOP_TRANSACTION = 'StopTransaction',
-  METER_VALUES = 'MeterValues'
+  METER_VALUES = 'MeterValues',
+  DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification'
 }
 
 export enum OCPP16IncomingRequestCommand {
@@ -25,11 +28,12 @@ export enum OCPP16IncomingRequestCommand {
   SET_CHARGING_PROFILE = 'SetChargingProfile',
   CLEAR_CHARGING_PROFILE = 'ClearChargingProfile',
   REMOTE_START_TRANSACTION = 'RemoteStartTransaction',
-  REMOTE_STOP_TRANSACTION = 'RemoteStopTransaction'
+  REMOTE_STOP_TRANSACTION = 'RemoteStopTransaction',
+  GET_DIAGNOSTICS = 'GetDiagnostics',
+  TRIGGER_MESSAGE = 'TriggerMessage'
 }
 
-// eslint-disable-next-line @typescript-eslint/no-empty-interface
-export interface HeartbeatRequest { }
+export type HeartbeatRequest = EmptyObject;
 
 export interface OCPP16BootNotificationRequest {
   chargeBoxSerialNumber?: string;
@@ -106,3 +110,29 @@ export interface ClearChargingProfileRequest {
   chargingProfilePurpose?: ChargingProfilePurposeType;
   stackLevel?: number;
 }
+
+export interface GetDiagnosticsRequest {
+  location: string;
+  retries?: number;
+  retryInterval?: number;
+  startTime?: Date;
+  stopTime?: Date;
+}
+
+export interface DiagnosticsStatusNotificationRequest {
+  status: OCPP16DiagnosticsStatus
+}
+
+export enum MessageTrigger {
+  BootNotification = 'BootNotification',
+  DiagnosticsStatusNotification = 'DiagnosticsStatusNotification',
+  FirmwareStatusNotification = 'FirmwareStatusNotification',
+  Heartbeat = 'Heartbeat',
+  MeterValues = 'MeterValues',
+  StatusNotification = 'StatusNotification'
+}
+
+export interface OCPP16TriggerMessageRequest {
+  requestedMessage: MessageTrigger;
+  connectorId?: number
+}