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