fix: add missing type definition file
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 1.6 / Responses.ts
index 317926f3fe921be2020dc59ac6c687cea0b7c1bc..e7814c4f178caec976040c3d6e9372c155cf1729 100644 (file)
@@ -1,16 +1,23 @@
-import { OCPPConfigurationKey } from '../Configuration';
+import type {
+  EmptyObject,
+  GenericStatus,
+  JsonObject,
+  OCPP16ChargingSchedule,
+  OCPPConfigurationKey,
+  RegistrationStatusEnumType,
+} from '../../internal';
 
-export interface HeartbeatResponse {
-  currentTime: string;
+export interface OCPP16HeartbeatResponse extends JsonObject {
+  currentTime: Date;
 }
 
 export enum OCPP16UnlockStatus {
   UNLOCKED = 'Unlocked',
   UNLOCK_FAILED = 'UnlockFailed',
-  NOT_SUPPORTED = 'NotSupported'
+  NOT_SUPPORTED = 'NotSupported',
 }
 
-export interface UnlockConnectorResponse {
+export interface UnlockConnectorResponse extends JsonObject {
   status: OCPP16UnlockStatus;
 }
 
@@ -18,29 +25,22 @@ export enum OCPP16ConfigurationStatus {
   ACCEPTED = 'Accepted',
   REJECTED = 'Rejected',
   REBOOT_REQUIRED = 'RebootRequired',
-  NOT_SUPPORTED = 'NotSupported'
+  NOT_SUPPORTED = 'NotSupported',
 }
 
-export interface ChangeConfigurationResponse {
+export interface ChangeConfigurationResponse extends JsonObject {
   status: OCPP16ConfigurationStatus;
 }
 
-export enum OCPP16RegistrationStatus {
-  ACCEPTED = 'Accepted',
-  PENDING = 'Pending',
-  REJECTED = 'Rejected'
-}
-
-export interface OCPP16BootNotificationResponse {
-  status: OCPP16RegistrationStatus;
-  currentTime: string;
+export interface OCPP16BootNotificationResponse extends JsonObject {
+  status: RegistrationStatusEnumType;
+  currentTime: Date;
   interval: number;
 }
 
-// eslint-disable-next-line @typescript-eslint/no-empty-interface
-export interface StatusNotificationResponse {}
+export type OCPP16StatusNotificationResponse = EmptyObject;
 
-export interface GetConfigurationResponse {
+export interface GetConfigurationResponse extends JsonObject {
   configurationKey: OCPPConfigurationKey[];
   unknownKey: string[];
 }
@@ -51,25 +51,64 @@ export enum OCPP16ChargingProfileStatus {
   NOT_SUPPORTED = 'NotSupported',
 }
 
-export interface SetChargingProfileResponse {
+export interface OCPP16GetCompositeScheduleResponse extends JsonObject {
+  status: GenericStatus;
+  connectorId?: number;
+  scheduleStart?: Date;
+  chargingSchedule?: OCPP16ChargingSchedule;
+}
+
+export interface SetChargingProfileResponse extends JsonObject {
   status: OCPP16ChargingProfileStatus;
 }
 
 export enum OCPP16AvailabilityStatus {
   ACCEPTED = 'Accepted',
   REJECTED = 'Rejected',
-  SCHEDULED = 'Scheduled'
+  SCHEDULED = 'Scheduled',
 }
 
-export interface ChangeAvailabilityResponse {
+export interface ChangeAvailabilityResponse extends JsonObject {
   status: OCPP16AvailabilityStatus;
 }
 
 export enum OCPP16ClearChargingProfileStatus {
   ACCEPTED = 'Accepted',
-  UNKNOWN = 'Unknown'
+  UNKNOWN = 'Unknown',
 }
 
-export interface ClearChargingProfileResponse {
+export interface ClearChargingProfileResponse extends JsonObject {
   status: OCPP16ClearChargingProfileStatus;
 }
+
+export type OCPP16UpdateFirmwareResponse = EmptyObject;
+
+export type OCPP16FirmwareStatusNotificationResponse = EmptyObject;
+
+export interface GetDiagnosticsResponse extends JsonObject {
+  fileName?: string;
+}
+
+export type OCPP16DiagnosticsStatusNotificationResponse = EmptyObject;
+
+export enum OCPP16TriggerMessageStatus {
+  ACCEPTED = 'Accepted',
+  REJECTED = 'Rejected',
+  NOT_IMPLEMENTED = 'NotImplemented',
+}
+
+export interface OCPP16TriggerMessageResponse extends JsonObject {
+  status: OCPP16TriggerMessageStatus;
+}
+
+export enum OCPP16DataTransferStatus {
+  ACCEPTED = 'Accepted',
+  REJECTED = 'Rejected',
+  UNKNOWN_MESSAGE_ID = 'UnknownMessageId',
+  UNKNOWN_VENDOR_ID = 'UnknownVendorId',
+}
+
+export interface OCPP16DataTransferResponse extends JsonObject {
+  status: OCPP16DataTransferStatus;
+  data?: string;
+}