Add enum for standard OCPP parameters key.
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 1.6 / Requests.ts
CommitLineData
f738a0e9
JB
1import { ChargePointErrorCode } from './ChargePointErrorCode';
2import { ChargePointStatus } from './ChargePointStatus';
3import { ChargingProfile } from './ChargingProfile';
6a64534b 4import { StandardParametersKey } from './Configuration';
5bd15d76 5
d9f60ba1
JB
6export 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
16export enum IncomingRequestCommand {
17 RESET = 'Reset',
18 CLEAR_CACHE = 'ClearCache',
19 UNLOCK_CONNECTOR = 'UnlockConnector',
20 GET_CONFIGURATION = 'GetConfiguration',
21 CHANGE_CONFIGURATION = 'ChangeConfiguration',
22 SET_CHARGING_PROFILE = 'SetChargingProfile',
23 REMOTE_START_TRANSACTION = 'RemoteStartTransaction',
24 REMOTE_STOP_TRANSACTION = 'RemoteStopTransaction'
25}
26
f738a0e9 27// eslint-disable-next-line @typescript-eslint/no-empty-interface
d0641efa 28export interface HeartbeatRequest { }
f738a0e9
JB
29
30export interface BootNotificationRequest {
31 chargeBoxSerialNumber?: string;
32 chargePointModel: string;
33 chargePointSerialNumber?: string;
34 chargePointVendor: string;
35 firmwareVersion?: string;
36 iccid?: string;
37 imsi?: string;
38 meterSerialNumber?: string;
39 meterType?: string;
40}
41
42export interface StatusNotificationRequest {
43 connectorId: number;
44 errorCode: ChargePointErrorCode;
45 info?: string;
46 status: ChargePointStatus;
47 timestamp?: string;
48 vendorId?: string;
49 vendorErrorCode?: string;
50}
51
52export interface ChangeConfigurationRequest {
6a64534b 53 key: string | StandardParametersKey;
f738a0e9
JB
54 value: string;
55}
56
57export interface RemoteStartTransactionRequest {
58 connectorId: number;
59 idTag: string;
60 chargingProfile?: ChargingProfile;
61}
62
63export interface RemoteStopTransactionRequest {
64 transactionId: number;
65}
66
67export interface UnlockConnectorRequest {
68 connectorId: number;
69}
70
71export interface GetConfigurationRequest {
6a64534b 72 key?: string | StandardParametersKey[];
f738a0e9
JB
73}
74
75export enum ResetType {
76 HARD = 'Hard',
77 SOFT = 'Soft'
78}
79
80export interface ResetRequest {
81 type: ResetType;
63b48f77 82}
8c476a1f
JB
83
84export interface SetChargingProfileRequest {
85 connectorId: number;
86 csChargingProfiles: ChargingProfile;
87}