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