build(deps-dev): apply updates
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 1.6 / Responses.ts
index cf0a84ef750d08cd71e3d75f58ae298805e5066a..b8c36ed24f471f6d23734b74c569e5eedd6ddfa0 100644 (file)
@@ -1,7 +1,11 @@
-import { OCPPConfigurationKey } from '../Configuration';
+import type { OCPP16ChargingSchedule } from './ChargingProfile.js'
+import type { EmptyObject } from '../../EmptyObject.js'
+import type { JsonObject } from '../../JsonType.js'
+import type { GenericStatus, RegistrationStatusEnumType } from '../Common.js'
+import type { OCPPConfigurationKey } from '../Configuration.js'
 
-export interface HeartbeatResponse {
-  currentTime: string;
+export interface OCPP16HeartbeatResponse extends JsonObject {
+  currentTime: Date
 }
 
 export enum OCPP16UnlockStatus {
@@ -10,8 +14,8 @@ export enum OCPP16UnlockStatus {
   NOT_SUPPORTED = 'NotSupported'
 }
 
-export interface UnlockConnectorResponse {
-  status: OCPP16UnlockStatus;
+export interface UnlockConnectorResponse extends JsonObject {
+  status: OCPP16UnlockStatus
 }
 
 export enum OCPP16ConfigurationStatus {
@@ -21,38 +25,38 @@ export enum OCPP16ConfigurationStatus {
   NOT_SUPPORTED = 'NotSupported'
 }
 
-export interface ChangeConfigurationResponse {
-  status: OCPP16ConfigurationStatus;
+export interface ChangeConfigurationResponse extends JsonObject {
+  status: OCPP16ConfigurationStatus
 }
 
-export enum OCPP16RegistrationStatus {
-  ACCEPTED = 'Accepted',
-  PENDING = 'Pending',
-  REJECTED = 'Rejected'
-}
-
-export interface OCPP16BootNotificationResponse {
-  status: OCPP16RegistrationStatus;
-  currentTime: string;
-  interval: number;
+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 {
-  configurationKey: OCPPConfigurationKey[];
-  unknownKey: string[];
+export interface GetConfigurationResponse extends JsonObject {
+  configurationKey: OCPPConfigurationKey[]
+  unknownKey: string[]
 }
 
 export enum OCPP16ChargingProfileStatus {
   ACCEPTED = 'Accepted',
   REJECTED = 'Rejected',
-  NOT_SUPPORTED = 'NotSupported',
+  NOT_SUPPORTED = 'NotSupported'
+}
+
+export interface OCPP16GetCompositeScheduleResponse extends JsonObject {
+  status: GenericStatus
+  connectorId?: number
+  scheduleStart?: Date
+  chargingSchedule?: OCPP16ChargingSchedule
 }
 
-export interface SetChargingProfileResponse {
-  status: OCPP16ChargingProfileStatus;
+export interface SetChargingProfileResponse extends JsonObject {
+  status: OCPP16ChargingProfileStatus
 }
 
 export enum OCPP16AvailabilityStatus {
@@ -61,8 +65,8 @@ export enum OCPP16AvailabilityStatus {
   SCHEDULED = 'Scheduled'
 }
 
-export interface ChangeAvailabilityResponse {
-  status: OCPP16AvailabilityStatus;
+export interface OCPP16ChangeAvailabilityResponse extends JsonObject {
+  status: OCPP16AvailabilityStatus
 }
 
 export enum OCPP16ClearChargingProfileStatus {
@@ -70,16 +74,19 @@ export enum OCPP16ClearChargingProfileStatus {
   UNKNOWN = 'Unknown'
 }
 
-export interface ClearChargingProfileResponse {
-  status: OCPP16ClearChargingProfileStatus;
+export interface OCPP16ClearChargingProfileResponse extends JsonObject {
+  status: OCPP16ClearChargingProfileStatus
 }
 
-export interface GetDiagnosticsResponse {
-  fileName?: string;
+export type OCPP16UpdateFirmwareResponse = EmptyObject
+
+export type OCPP16FirmwareStatusNotificationResponse = EmptyObject
+
+export interface GetDiagnosticsResponse extends JsonObject {
+  fileName?: string
 }
 
-// eslint-disable-next-line @typescript-eslint/no-empty-interface
-export interface DiagnosticsStatusNotificationResponse {}
+export type OCPP16DiagnosticsStatusNotificationResponse = EmptyObject
 
 export enum OCPP16TriggerMessageStatus {
   ACCEPTED = 'Accepted',
@@ -87,6 +94,31 @@ export enum OCPP16TriggerMessageStatus {
   NOT_IMPLEMENTED = 'NotImplemented'
 }
 
-export interface OCPP16TriggerMessageResponse {
+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
+}
+
+export enum OCPP16ReservationStatus {
+  ACCEPTED = 'Accepted',
+  FAULTED = 'Faulted',
+  OCCUPIED = 'Occupied',
+  REJECTED = 'Rejected',
+  UNAVAILABLE = 'Unavailable',
+  NOT_SUPPORTED = 'NotSupported'
+}
+
+export interface OCPP16ReserveNowResponse extends JsonObject {
+  status: OCPP16ReservationStatus
+}