Commit | Line | Data |
---|---|---|
f738a0e9 JB |
1 | import { ChargePointErrorCode } from './ChargePointErrorCode'; |
2 | import { ChargePointStatus } from './ChargePointStatus'; | |
3 | import { ChargingProfile } from './ChargingProfile'; | |
6a64534b | 4 | import { StandardParametersKey } from './Configuration'; |
5bd15d76 | 5 | |
d9f60ba1 JB |
6 | export 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 | ||
16 | export 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 | 28 | export interface HeartbeatRequest { } |
f738a0e9 JB |
29 | |
30 | export 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 | ||
42 | export 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 | ||
52 | export interface ChangeConfigurationRequest { | |
6a64534b | 53 | key: string | StandardParametersKey; |
f738a0e9 JB |
54 | value: string; |
55 | } | |
56 | ||
57 | export interface RemoteStartTransactionRequest { | |
58 | connectorId: number; | |
59 | idTag: string; | |
60 | chargingProfile?: ChargingProfile; | |
61 | } | |
62 | ||
63 | export interface RemoteStopTransactionRequest { | |
64 | transactionId: number; | |
65 | } | |
66 | ||
67 | export interface UnlockConnectorRequest { | |
68 | connectorId: number; | |
69 | } | |
70 | ||
71 | export interface GetConfigurationRequest { | |
6a64534b | 72 | key?: string | StandardParametersKey[]; |
f738a0e9 JB |
73 | } |
74 | ||
75 | export enum ResetType { | |
76 | HARD = 'Hard', | |
77 | SOFT = 'Soft' | |
78 | } | |
79 | ||
80 | export interface ResetRequest { | |
81 | type: ResetType; | |
63b48f77 | 82 | } |
8c476a1f JB |
83 | |
84 | export interface SetChargingProfileRequest { | |
85 | connectorId: number; | |
86 | csChargingProfiles: ChargingProfile; | |
87 | } |