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