| 1 | import { ChargePointErrorCode } from './ChargePointErrorCode'; |
| 2 | import { ChargePointStatus } from './ChargePointStatus'; |
| 3 | import { ChargingProfile } from './ChargingProfile'; |
| 4 | import { StandardParametersKey } from './Configuration'; |
| 5 | |
| 6 | export enum RequestCommand { |
| 7 | BOOT_NOTIFICATION = 'BootNotification', |
| 8 | HEARTBEAT = 'Heartbeat', |
| 9 | STATUS_NOTIFICATION = 'StatusNotification', |
| 10 | CHANGE_CONFIGURATION = 'ChangeConfiguration', |
| 11 | START_TRANSACTION = 'StartTransaction', |
| 12 | STOP_TRANSACTION = 'StopTransaction', |
| 13 | METERVALUES = 'MeterValues' |
| 14 | } |
| 15 | |
| 16 | export enum IncomingRequestCommand { |
| 17 | RESET = 'Reset', |
| 18 | CLEAR_CACHE = 'ClearCache', |
| 19 | CHANGE_AVAILABILITY = 'ChangeAvailability', |
| 20 | UNLOCK_CONNECTOR = 'UnlockConnector', |
| 21 | GET_CONFIGURATION = 'GetConfiguration', |
| 22 | CHANGE_CONFIGURATION = 'ChangeConfiguration', |
| 23 | SET_CHARGING_PROFILE = 'SetChargingProfile', |
| 24 | REMOTE_START_TRANSACTION = 'RemoteStartTransaction', |
| 25 | REMOTE_STOP_TRANSACTION = 'RemoteStopTransaction' |
| 26 | } |
| 27 | |
| 28 | // eslint-disable-next-line @typescript-eslint/no-empty-interface |
| 29 | export interface HeartbeatRequest { } |
| 30 | |
| 31 | export interface BootNotificationRequest { |
| 32 | chargeBoxSerialNumber?: string; |
| 33 | chargePointModel: string; |
| 34 | chargePointSerialNumber?: string; |
| 35 | chargePointVendor: string; |
| 36 | firmwareVersion?: string; |
| 37 | iccid?: string; |
| 38 | imsi?: string; |
| 39 | meterSerialNumber?: string; |
| 40 | meterType?: string; |
| 41 | } |
| 42 | |
| 43 | export interface StatusNotificationRequest { |
| 44 | connectorId: number; |
| 45 | errorCode: ChargePointErrorCode; |
| 46 | info?: string; |
| 47 | status: ChargePointStatus; |
| 48 | timestamp?: string; |
| 49 | vendorId?: string; |
| 50 | vendorErrorCode?: string; |
| 51 | } |
| 52 | |
| 53 | export interface ChangeConfigurationRequest { |
| 54 | key: string | StandardParametersKey; |
| 55 | value: string; |
| 56 | } |
| 57 | |
| 58 | export interface RemoteStartTransactionRequest { |
| 59 | connectorId: number; |
| 60 | idTag: string; |
| 61 | chargingProfile?: ChargingProfile; |
| 62 | } |
| 63 | |
| 64 | export interface RemoteStopTransactionRequest { |
| 65 | transactionId: number; |
| 66 | } |
| 67 | |
| 68 | export interface UnlockConnectorRequest { |
| 69 | connectorId: number; |
| 70 | } |
| 71 | |
| 72 | export interface GetConfigurationRequest { |
| 73 | key?: string | StandardParametersKey[]; |
| 74 | } |
| 75 | |
| 76 | export enum ResetType { |
| 77 | HARD = 'Hard', |
| 78 | SOFT = 'Soft' |
| 79 | } |
| 80 | |
| 81 | export interface ResetRequest { |
| 82 | type: ResetType; |
| 83 | } |
| 84 | |
| 85 | export interface SetChargingProfileRequest { |
| 86 | connectorId: number; |
| 87 | csChargingProfiles: ChargingProfile; |
| 88 | } |
| 89 | |
| 90 | export enum AvailabilityType { |
| 91 | INOPERATIVE = 'Inoperative', |
| 92 | OPERATIVE = 'Operative' |
| 93 | } |
| 94 | |
| 95 | export interface ChangeAvailabilityRequest { |
| 96 | connectorId: number; |
| 97 | type: AvailabilityType; |
| 98 | } |