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