X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2F2.0%2FRequests.ts;h=f075e642f7284f657398f5e3a7a46b0ab7f565db;hb=738acbf767e776699e06239a63cb35558018fcc0;hp=220a39b6f617a0f020aa5b65ff04baecbc0ad3c3;hpb=28f1c5749ad4ee138c34c345a7bd812b40ccbcfa;p=e-mobility-charging-stations-simulator.git diff --git a/src/types/ocpp/2.0/Requests.ts b/src/types/ocpp/2.0/Requests.ts index 220a39b6..f075e642 100644 --- a/src/types/ocpp/2.0/Requests.ts +++ b/src/types/ocpp/2.0/Requests.ts @@ -1,52 +1,58 @@ +import type { EmptyObject } from '../../EmptyObject.js' +import type { JsonObject } from '../../JsonType.js' import type { BootReasonEnumType, - EmptyObject, - JsonObject, - OCPP20ConnectorStatusEnumType, - OCPP20SetVariableDataType, -} from '../../internal'; + InstallCertificateUseEnumType, + OCPP20ConnectorStatusEnumType +} from './Common.js' +import type { OCPP20SetVariableDataType } from './Variables.js' export enum OCPP20RequestCommand { BOOT_NOTIFICATION = 'BootNotification', HEARTBEAT = 'Heartbeat', - STATUS_NOTIFICATION = 'StatusNotification', + STATUS_NOTIFICATION = 'StatusNotification' } export enum OCPP20IncomingRequestCommand { CLEAR_CACHE = 'ClearCache', REQUEST_START_TRANSACTION = 'RequestStartTransaction', - REQUEST_STOP_TRANSACTION = 'RequestStopTransaction', + REQUEST_STOP_TRANSACTION = 'RequestStopTransaction' } -type ModemType = { - iccid?: string; - imsi?: string; -} & JsonObject; +interface ModemType extends JsonObject { + iccid?: string + imsi?: string +} -type ChargingStationType = { - serialNumber?: string; - model: string; - vendorName: string; - firmwareVersion?: string; - modem?: ModemType; -} & JsonObject; +interface ChargingStationType extends JsonObject { + serialNumber?: string + model: string + vendorName: string + firmwareVersion?: string + modem?: ModemType +} -export type OCPP20BootNotificationRequest = { - reason: BootReasonEnumType; - chargingStation: ChargingStationType; -} & JsonObject; +export interface OCPP20BootNotificationRequest extends JsonObject { + reason: BootReasonEnumType + chargingStation: ChargingStationType +} -export type OCPP20HeartbeatRequest = EmptyObject; +export type OCPP20HeartbeatRequest = EmptyObject -export type OCPP20ClearCacheRequest = EmptyObject; +export type OCPP20ClearCacheRequest = EmptyObject -export type OCPP20StatusNotificationRequest = { - timestamp: Date; - connectorStatus: OCPP20ConnectorStatusEnumType; - evseId: number; - connectorId: number; -} & JsonObject; +export interface OCPP20StatusNotificationRequest extends JsonObject { + timestamp: Date + connectorStatus: OCPP20ConnectorStatusEnumType + evseId: number + connectorId: number +} -export type OCPP20SetVariablesRequest = { - setVariableData: OCPP20SetVariableDataType[]; -} & JsonObject; +export interface OCPP20SetVariablesRequest extends JsonObject { + setVariableData: OCPP20SetVariableDataType[] +} + +export interface OCPP20InstallCertificateRequest extends JsonObject { + certificateType: InstallCertificateUseEnumType + certificate: string +}