X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2F1.6%2FResponses.ts;h=08076964f5dd4a1b48f3d3df898b4b2c90e33126;hb=fec4d204dd05c108fb49312bb7a570d15a4eb4bb;hp=68df3e91090ac8c6e2e380962c1d49e98e7596c9;hpb=47e224777669f935f45d443b6da948e7977fd9b7;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 68df3e91..08076964 100644 --- a/src/types/ocpp/1.6/Responses.ts +++ b/src/types/ocpp/1.6/Responses.ts @@ -1,16 +1,18 @@ +import { EmptyObject } from '../../EmptyObject'; +import { JsonObject } from '../../JsonType'; import { OCPPConfigurationKey } from '../Configuration'; -export interface HeartbeatResponse { +export interface OCPP16HeartbeatResponse extends JsonObject { currentTime: string; } 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 +20,28 @@ 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' + REJECTED = 'Rejected', } -export interface OCPP16BootNotificationResponse { +export interface OCPP16BootNotificationResponse extends JsonObject { status: OCPP16RegistrationStatus; currentTime: string; 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,32 +52,41 @@ export enum OCPP16ChargingProfileStatus { NOT_SUPPORTED = 'NotSupported', } -export interface SetChargingProfileResponse { +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 interface GetDiagnosticsResponse extends JsonObject { fileName?: string; } -// eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface DiagnosticsStatusNotificationResponse {} +export type DiagnosticsStatusNotificationResponse = EmptyObject; + +export enum OCPP16TriggerMessageStatus { + ACCEPTED = 'Accepted', + REJECTED = 'Rejected', + NOT_IMPLEMENTED = 'NotImplemented', +} + +export interface OCPP16TriggerMessageResponse extends JsonObject { + status: OCPP16TriggerMessageStatus; +}