X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2F1.6%2FResponses.ts;h=1a163aa82b72745c7ab42b560dae78c90f2642f5;hb=6e3d9d04815abfe85d31735fc38bdf0253d85026;hp=08076964f5dd4a1b48f3d3df898b4b2c90e33126;hpb=3e0905a14af7b7e0a96e859d6c4c615044845d54;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 08076964..1a163aa8 100644 --- a/src/types/ocpp/1.6/Responses.ts +++ b/src/types/ocpp/1.6/Responses.ts @@ -1,9 +1,11 @@ -import { EmptyObject } from '../../EmptyObject'; -import { JsonObject } from '../../JsonType'; -import { OCPPConfigurationKey } from '../Configuration'; +import type { OCPP16ChargingSchedule } from './ChargingProfile'; +import type { EmptyObject } from '../../EmptyObject'; +import type { JsonObject } from '../../JsonType'; +import type { OCPPConfigurationKey } from '../Configuration'; +import { GenericStatus, type RegistrationStatusEnumType } from '../Responses'; export interface OCPP16HeartbeatResponse extends JsonObject { - currentTime: string; + currentTime: Date; } export enum OCPP16UnlockStatus { @@ -27,15 +29,9 @@ export interface ChangeConfigurationResponse extends JsonObject { status: OCPP16ConfigurationStatus; } -export enum OCPP16RegistrationStatus { - ACCEPTED = 'Accepted', - PENDING = 'Pending', - REJECTED = 'Rejected', -} - export interface OCPP16BootNotificationResponse extends JsonObject { - status: OCPP16RegistrationStatus; - currentTime: string; + status: RegistrationStatusEnumType; + currentTime: Date; interval: number; } @@ -52,6 +48,13 @@ export enum OCPP16ChargingProfileStatus { NOT_SUPPORTED = 'NotSupported', } +export interface OCPP16GetCompositeScheduleResponse extends JsonObject { + status: GenericStatus; + connectorId?: number; + scheduleStart?: Date; + chargingSchedule?: OCPP16ChargingSchedule; +} + export interface SetChargingProfileResponse extends JsonObject { status: OCPP16ChargingProfileStatus; } @@ -75,11 +78,15 @@ export interface ClearChargingProfileResponse extends JsonObject { status: OCPP16ClearChargingProfileStatus; } +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', @@ -90,3 +97,32 @@ export enum OCPP16TriggerMessageStatus { 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 interface OCPP16CancelReservationResponse extends JsonObject { + status: GenericStatus; +} + +export enum OCPP16ReservationStatus { + ACCEPTED = 'Accepted', + FAULTED = 'Faulted', + OCCUPIED = 'Occupied', + REJECTED = 'Rejected', + UNAVAILABLE = 'Unavailable', + NOT_SUPPORTED = 'NotSupported', +} + +export interface OCPP16ReserveNowResponse extends JsonObject { + status: OCPP16ReservationStatus; +}