Add git submodules init script.
[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',
4dff73b0 19 CHANGE_AVAILABILITY = 'ChangeAvailability',
d9f60ba1
JB
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
f738a0e9 28// eslint-disable-next-line @typescript-eslint/no-empty-interface
d0641efa 29export interface HeartbeatRequest { }
f738a0e9
JB
30
31export 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
43export 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
53export interface ChangeConfigurationRequest {
6a64534b 54 key: string | StandardParametersKey;
f738a0e9
JB
55 value: string;
56}
57
58export interface RemoteStartTransactionRequest {
59 connectorId: number;
60 idTag: string;
61 chargingProfile?: ChargingProfile;
62}
63
64export interface RemoteStopTransactionRequest {
65 transactionId: number;
66}
67
68export interface UnlockConnectorRequest {
69 connectorId: number;
70}
71
72export interface GetConfigurationRequest {
6a64534b 73 key?: string | StandardParametersKey[];
f738a0e9
JB
74}
75
76export enum ResetType {
77 HARD = 'Hard',
78 SOFT = 'Soft'
79}
80
81export interface ResetRequest {
82 type: ResetType;
63b48f77 83}
8c476a1f
JB
84
85export interface SetChargingProfileRequest {
86 connectorId: number;
87 csChargingProfiles: ChargingProfile;
88}
4dff73b0
JB
89
90export enum AvailabilityType {
91 INOPERATIVE = 'Inoperative',
92 OPERATIVE = 'Operative'
93}
94
95export interface ChangeAvailabilityRequest {
96 connectorId: number;
97 type: AvailabilityType;
98}