X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftypes%2Focpp%2F1.6%2FResponses.ts;h=2acee1ea7f03e7bb8d3b9359da7874c7dd20ae5b;hb=a9ed42b2eaac1fb26700d6d86952d0d2cee4d857;hp=f40cc88ba00992d8110d98df3c3f16b168e74c55;hpb=05745045efc825738ba9ba4b30d4d4ec932a5dd3;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 f40cc88b..2acee1ea 100644 --- a/src/types/ocpp/1.6/Responses.ts +++ b/src/types/ocpp/1.6/Responses.ts @@ -1,84 +1,92 @@ -import { OCPPConfigurationKey } from '../Configuration'; +import type { EmptyObject } from '../../EmptyObject'; +import type { JsonObject } from '../../JsonType'; +import type { OCPPConfigurationKey } from '../Configuration'; -export interface HeartbeatResponse { +export interface OCPP16HeartbeatResponse extends JsonObject { currentTime: string; } -export enum DefaultStatus { - ACCEPTED = 'Accepted', - REJECTED = 'Rejected' -} - -export interface DefaultResponse { - status: DefaultStatus; -} - -export enum UnlockStatus { +export enum OCPP16UnlockStatus { UNLOCKED = 'Unlocked', UNLOCK_FAILED = 'UnlockFailed', - NOT_SUPPORTED = 'NotSupported' + NOT_SUPPORTED = 'NotSupported', } -export interface UnlockConnectorResponse { - status: UnlockStatus; +export interface UnlockConnectorResponse extends JsonObject { + status: OCPP16UnlockStatus; } -export enum ConfigurationStatus { +export enum OCPP16ConfigurationStatus { ACCEPTED = 'Accepted', REJECTED = 'Rejected', REBOOT_REQUIRED = 'RebootRequired', - NOT_SUPPORTED = 'NotSupported' + NOT_SUPPORTED = 'NotSupported', } -export interface ChangeConfigurationResponse { - status: ConfigurationStatus; +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[]; } -export enum ChargingProfileStatus { +export enum OCPP16ChargingProfileStatus { ACCEPTED = 'Accepted', REJECTED = 'Rejected', NOT_SUPPORTED = 'NotSupported', } -export interface SetChargingProfileResponse { - status: ChargingProfileStatus; +export interface SetChargingProfileResponse extends JsonObject { + status: OCPP16ChargingProfileStatus; } -export enum AvailabilityStatus { +export enum OCPP16AvailabilityStatus { ACCEPTED = 'Accepted', REJECTED = 'Rejected', - SCHEDULED = 'Scheduled' + SCHEDULED = 'Scheduled', } -export interface ChangeAvailabilityResponse { - status: AvailabilityStatus; +export interface ChangeAvailabilityResponse extends JsonObject { + status: OCPP16AvailabilityStatus; } -export enum ClearChargingProfileStatus { +export enum OCPP16ClearChargingProfileStatus { ACCEPTED = 'Accepted', - UNKNOWN = 'Unknown' + UNKNOWN = 'Unknown', +} + +export interface ClearChargingProfileResponse extends JsonObject { + status: OCPP16ClearChargingProfileStatus; +} + +export interface GetDiagnosticsResponse extends JsonObject { + fileName?: string; +} + +export type DiagnosticsStatusNotificationResponse = EmptyObject; + +export enum OCPP16TriggerMessageStatus { + ACCEPTED = 'Accepted', + REJECTED = 'Rejected', + NOT_IMPLEMENTED = 'NotImplemented', } -export interface ClearChargingProfileResponse { - status: ClearChargingProfileStatus; +export interface OCPP16TriggerMessageResponse extends JsonObject { + status: OCPP16TriggerMessageStatus; }