Commit | Line | Data |
---|---|---|
e7aeea18 JB |
1 | import { |
2 | OCPP16AvailabilityStatus, | |
3 | OCPP16BootNotificationResponse, | |
4 | OCPP16ChargingProfileStatus, | |
5 | OCPP16ClearChargingProfileStatus, | |
6 | OCPP16ConfigurationStatus, | |
f22266fd | 7 | OCPP16HeartbeatResponse, |
e7aeea18 | 8 | OCPP16RegistrationStatus, |
f22266fd | 9 | OCPP16StatusNotificationResponse, |
e7aeea18 JB |
10 | OCPP16TriggerMessageStatus, |
11 | OCPP16UnlockStatus, | |
12 | } from './1.6/Responses'; | |
c0560973 | 13 | |
d1888640 | 14 | import { JsonType } from '../JsonType'; |
f22266fd | 15 | import { OCPP16MeterValuesResponse } from './1.6/MeterValues'; |
d1888640 | 16 | |
e7aeea18 JB |
17 | export type ResponseHandler = ( |
18 | payload: JsonType | string, | |
19 | requestPayload?: JsonType | |
20 | ) => void | Promise<void>; | |
58144adb | 21 | |
c0560973 JB |
22 | export type BootNotificationResponse = OCPP16BootNotificationResponse; |
23 | ||
f22266fd JB |
24 | export type HeartbeatResponse = OCPP16HeartbeatResponse; |
25 | ||
26 | export type StatusNotificationResponse = OCPP16StatusNotificationResponse; | |
27 | ||
28 | export type MeterValuesResponse = OCPP16MeterValuesResponse; | |
29 | ||
9ccca265 JB |
30 | export enum DefaultStatus { |
31 | ACCEPTED = 'Accepted', | |
e7aeea18 | 32 | REJECTED = 'Rejected', |
9ccca265 JB |
33 | } |
34 | ||
35 | export interface DefaultResponse { | |
36 | status: DefaultStatus; | |
37 | } | |
38 | ||
c0560973 JB |
39 | export type RegistrationStatus = OCPP16RegistrationStatus; |
40 | ||
41 | export const RegistrationStatus = { | |
e7aeea18 | 42 | ...OCPP16RegistrationStatus, |
c0560973 | 43 | }; |
9ccca265 JB |
44 | |
45 | export type AvailabilityStatus = OCPP16AvailabilityStatus; | |
46 | ||
47 | export const AvailabilityStatus = { | |
e7aeea18 | 48 | ...OCPP16AvailabilityStatus, |
9ccca265 JB |
49 | }; |
50 | ||
51 | export type ChargingProfileStatus = OCPP16ChargingProfileStatus; | |
52 | ||
53 | export const ChargingProfileStatus = { | |
e7aeea18 | 54 | ...OCPP16ChargingProfileStatus, |
9ccca265 JB |
55 | }; |
56 | ||
57 | export type ClearChargingProfileStatus = OCPP16ClearChargingProfileStatus; | |
58 | ||
59 | export const ClearChargingProfileStatus = { | |
e7aeea18 | 60 | ...OCPP16ClearChargingProfileStatus, |
9ccca265 JB |
61 | }; |
62 | ||
63 | export type ConfigurationStatus = OCPP16ConfigurationStatus; | |
64 | ||
65 | export const ConfigurationStatus = { | |
e7aeea18 | 66 | ...OCPP16ConfigurationStatus, |
9ccca265 JB |
67 | }; |
68 | ||
69 | export type UnlockStatus = OCPP16UnlockStatus; | |
70 | ||
71 | export const UnlockStatus = { | |
e7aeea18 | 72 | ...OCPP16UnlockStatus, |
9ccca265 | 73 | }; |
802cfa13 JB |
74 | |
75 | export type TriggerMessageStatus = OCPP16TriggerMessageStatus; | |
76 | ||
77 | export const TriggerMessageStatus = { | |
e7aeea18 | 78 | ...OCPP16TriggerMessageStatus, |
802cfa13 | 79 | }; |