X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Ftypes%2Focpp%2F2.0%2FRequests.ts;h=ef7a5161b3797282425947b30d5e0c30c85bddaa;hb=8f9060ba0f4e2e22053ceb34f357bb8a1263d889;hp=407fdfe4482bb1e9cb5b157bfe1e6b3523af0a60;hpb=6415403ce9894b9a1d7d5d5f698483e58463370f;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 407fdfe4..ef7a5161 100644 --- a/src/types/ocpp/2.0/Requests.ts +++ b/src/types/ocpp/2.0/Requests.ts @@ -1,63 +1,58 @@ -import type { EmptyObject } from '../../EmptyObject'; -import type { JsonObject } from '../../JsonType'; +import type { + BootReasonEnumType, + InstallCertificateUseEnumType, + OCPP20ConnectorStatusEnumType +} from './Common.js' +import type { OCPP20SetVariableDataType } from './Variables.js' +import type { EmptyObject } from '../../EmptyObject.js' +import type { JsonObject } from '../../JsonType.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' } -export enum BootReasonEnumType { - ApplicationReset = 'ApplicationReset', - FirmwareUpdate = 'FirmwareUpdate', - LocalReset = 'LocalReset', - PowerUp = 'PowerUp', - RemoteReset = 'RemoteReset', - ScheduledReset = 'ScheduledReset', - Triggered = 'Triggered', - Unknown = 'Unknown', - Watchdog = 'Watchdog', -} - -export type ModemType = { - iccid?: string; - imsi?: string; -} & JsonObject; +type ModemType = { + iccid?: string + imsi?: string +} & JsonObject -export type ChargingStationType = { - serialNumber?: string; - model: string; - vendorName: string; - firmwareVersion?: string; - modem?: ModemType; -} & JsonObject; +type ChargingStationType = { + serialNumber?: string + model: string + vendorName: string + firmwareVersion?: string + modem?: ModemType +} & JsonObject export type OCPP20BootNotificationRequest = { - reason: BootReasonEnumType; - chargingStation: ChargingStationType; -} & JsonObject; + reason: BootReasonEnumType + chargingStation: ChargingStationType +} & JsonObject -export type OCPP20HeartbeatRequest = EmptyObject; +export type OCPP20HeartbeatRequest = EmptyObject -export type OCPP20ClearCacheRequest = EmptyObject; - -export enum OCPP20ConnectorStatusEnumType { - AVAILABLE = 'Available', - OCCUPIED = 'Occupied', - RESERVED = 'Reserved', - UNAVAILABLE = 'Unavailable', - FAULTED = 'Faulted', -} +export type OCPP20ClearCacheRequest = EmptyObject export type OCPP20StatusNotificationRequest = { - timestamp: Date; - connectorStatus: OCPP20ConnectorStatusEnumType; - evseId: number; - connectorId: number; -} & JsonObject; + timestamp: Date + connectorStatus: OCPP20ConnectorStatusEnumType + evseId: number + connectorId: number +} & JsonObject + +export type OCPP20SetVariablesRequest = { + setVariableData: OCPP20SetVariableDataType[] +} & JsonObject + +export type OCPP20InstallCertificateRequest = { + certificateType: InstallCertificateUseEnumType + certificate: string +} & JsonObject