X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2F1.6%2FResponses.ts;h=e7814c4f178caec976040c3d6e9372c155cf1729;hb=6625c5ec9c5260260aeb17e86ddd4ca5a2d15d10;hp=ac59c291a544f790e0892135002562c7c166d840;hpb=f22266fd29f7f11ba883d7f799ef607be05d4232;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 ac59c291..e7814c4f 100644 --- a/src/types/ocpp/1.6/Responses.ts +++ b/src/types/ocpp/1.6/Responses.ts @@ -1,9 +1,14 @@ -import { EmptyObject } from '../../EmptyObject'; -import { JsonType } from '../../JsonType'; -import { OCPPConfigurationKey } from '../Configuration'; +import type { + EmptyObject, + GenericStatus, + JsonObject, + OCPP16ChargingSchedule, + OCPPConfigurationKey, + RegistrationStatusEnumType, +} from '../../internal'; -export interface OCPP16HeartbeatResponse extends JsonType { - currentTime: string; +export interface OCPP16HeartbeatResponse extends JsonObject { + currentTime: Date; } export enum OCPP16UnlockStatus { @@ -12,7 +17,7 @@ export enum OCPP16UnlockStatus { NOT_SUPPORTED = 'NotSupported', } -export interface UnlockConnectorResponse extends JsonType { +export interface UnlockConnectorResponse extends JsonObject { status: OCPP16UnlockStatus; } @@ -23,25 +28,19 @@ export enum OCPP16ConfigurationStatus { NOT_SUPPORTED = 'NotSupported', } -export interface ChangeConfigurationResponse extends JsonType { +export interface ChangeConfigurationResponse extends JsonObject { status: OCPP16ConfigurationStatus; } -export enum OCPP16RegistrationStatus { - ACCEPTED = 'Accepted', - PENDING = 'Pending', - REJECTED = 'Rejected', -} - -export interface OCPP16BootNotificationResponse extends JsonType { - status: OCPP16RegistrationStatus; - currentTime: string; +export interface OCPP16BootNotificationResponse extends JsonObject { + status: RegistrationStatusEnumType; + currentTime: Date; interval: number; } export type OCPP16StatusNotificationResponse = EmptyObject; -export interface GetConfigurationResponse extends JsonType { +export interface GetConfigurationResponse extends JsonObject { configurationKey: OCPPConfigurationKey[]; unknownKey: string[]; } @@ -52,7 +51,14 @@ export enum OCPP16ChargingProfileStatus { NOT_SUPPORTED = 'NotSupported', } -export interface SetChargingProfileResponse extends JsonType { +export interface OCPP16GetCompositeScheduleResponse extends JsonObject { + status: GenericStatus; + connectorId?: number; + scheduleStart?: Date; + chargingSchedule?: OCPP16ChargingSchedule; +} + +export interface SetChargingProfileResponse extends JsonObject { status: OCPP16ChargingProfileStatus; } @@ -62,7 +68,7 @@ export enum OCPP16AvailabilityStatus { SCHEDULED = 'Scheduled', } -export interface ChangeAvailabilityResponse extends JsonType { +export interface ChangeAvailabilityResponse extends JsonObject { status: OCPP16AvailabilityStatus; } @@ -71,15 +77,19 @@ export enum OCPP16ClearChargingProfileStatus { UNKNOWN = 'Unknown', } -export interface ClearChargingProfileResponse extends JsonType { +export interface ClearChargingProfileResponse extends JsonObject { status: OCPP16ClearChargingProfileStatus; } -export interface GetDiagnosticsResponse extends JsonType { +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', @@ -87,6 +97,18 @@ export enum OCPP16TriggerMessageStatus { NOT_IMPLEMENTED = 'NotImplemented', } -export interface OCPP16TriggerMessageResponse extends JsonType { +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; +}