X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2F1.6%2FResponses.ts;h=e7814c4f178caec976040c3d6e9372c155cf1729;hb=6625c5ec9c5260260aeb17e86ddd4ca5a2d15d10;hp=4f526b94dd600ad40ed8aa4d0d2e95e6c6140737;hpb=c12b43d0f4569a189e064768c14088ab8fce9e1b;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ocpp/1.6/Responses.ts b/src/types/ocpp/1.6/Responses.ts index 4f526b94..e7814c4f 100644 --- a/src/types/ocpp/1.6/Responses.ts +++ b/src/types/ocpp/1.6/Responses.ts @@ -1,17 +1,23 @@ -import { EmptyObject } from '../../EmptyObject'; -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; } @@ -19,28 +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; } -export type StatusNotificationResponse = EmptyObject; +export type OCPP16StatusNotificationResponse = EmptyObject; -export interface GetConfigurationResponse { +export interface GetConfigurationResponse extends JsonObject { configurationKey: OCPPConfigurationKey[]; unknownKey: string[]; } @@ -51,41 +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 interface GetDiagnosticsResponse { +export type OCPP16UpdateFirmwareResponse = EmptyObject; + +export type OCPP16FirmwareStatusNotificationResponse = EmptyObject; + +export interface GetDiagnosticsResponse extends JsonObject { fileName?: string; } -export type DiagnosticsStatusNotificationResponse = EmptyObject; +export type OCPP16DiagnosticsStatusNotificationResponse = EmptyObject; export enum OCPP16TriggerMessageStatus { ACCEPTED = 'Accepted', REJECTED = 'Rejected', - NOT_IMPLEMENTED = 'NotImplemented' + 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 OCPP16TriggerMessageResponse { - status: OCPP16TriggerMessageStatus +export interface OCPP16DataTransferResponse extends JsonObject { + status: OCPP16DataTransferStatus; + data?: string; }