Apply dependencies update
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / 1.6 / Requests.ts
CommitLineData
c0560973 1import { ChargingProfilePurposeType, OCPP16ChargingProfile } from './ChargingProfile';
edf4bd64 2
c12b43d0 3import { EmptyObject } from '../../EmptyObject';
e3822d6f 4import { JsonObject } from '../../JsonType';
c0560973
JB
5import { OCPP16ChargePointErrorCode } from './ChargePointErrorCode';
6import { OCPP16ChargePointStatus } from './ChargePointStatus';
47e22477 7import { OCPP16DiagnosticsStatus } from './DiagnosticsStatus';
c0560973 8import { OCPP16StandardParametersKey } from './Configuration';
5bd15d76 9
c0560973 10export enum OCPP16RequestCommand {
d9f60ba1
JB
11 BOOT_NOTIFICATION = 'BootNotification',
12 HEARTBEAT = 'Heartbeat',
13 STATUS_NOTIFICATION = 'StatusNotification',
ef6076c1 14 AUTHORIZE = 'Authorize',
d9f60ba1
JB
15 START_TRANSACTION = 'StartTransaction',
16 STOP_TRANSACTION = 'StopTransaction',
47e22477 17 METER_VALUES = 'MeterValues',
e7aeea18 18 DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification',
d9f60ba1
JB
19}
20
c0560973 21export enum OCPP16IncomingRequestCommand {
d9f60ba1
JB
22 RESET = 'Reset',
23 CLEAR_CACHE = 'ClearCache',
4dff73b0 24 CHANGE_AVAILABILITY = 'ChangeAvailability',
d9f60ba1
JB
25 UNLOCK_CONNECTOR = 'UnlockConnector',
26 GET_CONFIGURATION = 'GetConfiguration',
27 CHANGE_CONFIGURATION = 'ChangeConfiguration',
28 SET_CHARGING_PROFILE = 'SetChargingProfile',
edf4bd64 29 CLEAR_CHARGING_PROFILE = 'ClearChargingProfile',
d9f60ba1 30 REMOTE_START_TRANSACTION = 'RemoteStartTransaction',
47e22477 31 REMOTE_STOP_TRANSACTION = 'RemoteStopTransaction',
802cfa13 32 GET_DIAGNOSTICS = 'GetDiagnostics',
e7aeea18 33 TRIGGER_MESSAGE = 'TriggerMessage',
d9f60ba1
JB
34}
35
ef6fa3fb 36export type OCPP16HeartbeatRequest = EmptyObject;
f738a0e9 37
e3822d6f 38export interface OCPP16BootNotificationRequest extends JsonObject {
fec4d204 39 chargePointVendor: string;
f738a0e9
JB
40 chargePointModel: string;
41 chargePointSerialNumber?: string;
fec4d204 42 chargeBoxSerialNumber?: string;
f738a0e9
JB
43 firmwareVersion?: string;
44 iccid?: string;
45 imsi?: string;
f738a0e9 46 meterType?: string;
fec4d204 47 meterSerialNumber?: string;
f738a0e9
JB
48}
49
e3822d6f 50export interface OCPP16StatusNotificationRequest extends JsonObject {
f738a0e9 51 connectorId: number;
c0560973 52 errorCode: OCPP16ChargePointErrorCode;
f738a0e9 53 info?: string;
c0560973 54 status: OCPP16ChargePointStatus;
f738a0e9
JB
55 timestamp?: string;
56 vendorId?: string;
57 vendorErrorCode?: string;
58}
59
e3822d6f 60export interface ChangeConfigurationRequest extends JsonObject {
c0560973 61 key: string | OCPP16StandardParametersKey;
f738a0e9
JB
62 value: string;
63}
64
e3822d6f 65export interface RemoteStartTransactionRequest extends JsonObject {
f738a0e9
JB
66 connectorId: number;
67 idTag: string;
c0560973 68 chargingProfile?: OCPP16ChargingProfile;
f738a0e9
JB
69}
70
e3822d6f 71export interface RemoteStopTransactionRequest extends JsonObject {
f738a0e9
JB
72 transactionId: number;
73}
74
e3822d6f 75export interface UnlockConnectorRequest extends JsonObject {
f738a0e9
JB
76 connectorId: number;
77}
78
e3822d6f 79export interface GetConfigurationRequest extends JsonObject {
c0560973 80 key?: string | OCPP16StandardParametersKey[];
f738a0e9
JB
81}
82
83export enum ResetType {
84 HARD = 'Hard',
e7aeea18 85 SOFT = 'Soft',
f738a0e9
JB
86}
87
e3822d6f 88export interface ResetRequest extends JsonObject {
f738a0e9 89 type: ResetType;
63b48f77 90}
8c476a1f 91
e3822d6f 92export interface SetChargingProfileRequest extends JsonObject {
8c476a1f 93 connectorId: number;
c0560973 94 csChargingProfiles: OCPP16ChargingProfile;
8c476a1f 95}
4dff73b0 96
c0560973 97export enum OCPP16AvailabilityType {
4dff73b0 98 INOPERATIVE = 'Inoperative',
e7aeea18 99 OPERATIVE = 'Operative',
4dff73b0
JB
100}
101
e3822d6f 102export interface ChangeAvailabilityRequest extends JsonObject {
4dff73b0 103 connectorId: number;
c0560973 104 type: OCPP16AvailabilityType;
4dff73b0 105}
edf4bd64 106
e3822d6f 107export interface ClearChargingProfileRequest extends JsonObject {
edf4bd64
JB
108 id?: number;
109 connectorId?: number;
110 chargingProfilePurpose?: ChargingProfilePurposeType;
111 stackLevel?: number;
112}
47e22477 113
e3822d6f 114export interface GetDiagnosticsRequest extends JsonObject {
47e22477
JB
115 location: string;
116 retries?: number;
117 retryInterval?: number;
118 startTime?: Date;
119 stopTime?: Date;
120}
121
e3822d6f 122export interface DiagnosticsStatusNotificationRequest extends JsonObject {
e7aeea18 123 status: OCPP16DiagnosticsStatus;
47e22477 124}
802cfa13
JB
125
126export enum MessageTrigger {
127 BootNotification = 'BootNotification',
128 DiagnosticsStatusNotification = 'DiagnosticsStatusNotification',
129 FirmwareStatusNotification = 'FirmwareStatusNotification',
130 Heartbeat = 'Heartbeat',
131 MeterValues = 'MeterValues',
e7aeea18 132 StatusNotification = 'StatusNotification',
802cfa13
JB
133}
134
e3822d6f 135export interface OCPP16TriggerMessageRequest extends JsonObject {
802cfa13 136 requestedMessage: MessageTrigger;
e7aeea18 137 connectorId?: number;
802cfa13 138}