2 static REST_RESPONSE_SUCCESS
= {status
: 'Success'};
4 static CONN_STATUS_AVAILABLE
= 'Available';
5 static CONN_STATUS_OCCUPIED
= 'Occupied';
7 static STATS_GROUP_BY_CONSUMPTION
= 'C';
8 static STATS_GROUP_BY_USAGE
= 'U';
11 static ENTITY_SITE
= 'Site';
12 static ENTITY_SITES
= 'Sites';
13 static ENTITY_SITE_AREA
= 'SiteArea';
14 static ENTITY_SITE_AREAS
= 'SiteAreas';
15 static ENTITY_COMPANY
= 'Company';
16 static ENTITY_COMPANIES
= 'Companies';
17 static ENTITY_CHARGING_STATION
= 'ChargingStation';
18 static ENTITY_CHARGING_STATIONS
= 'ChargingStations';
19 static ENTITY_TENANT
= 'Tenant';
20 static ENTITY_TENANTS
= 'Tenants';
21 static ENTITY_TRANSACTION
= 'Transaction';
22 static ENTITY_TRANSACTIONS
= 'Transactions';
23 static ENTITY_TRANSACTION_METER_VALUES
= 'MeterValues';
24 static ENTITY_TRANSACTION_STOP
= 'Stop';
25 static ENTITY_USER
= 'User';
26 static ENTITY_USERS
= 'Users';
27 static ENTITY_VEHICLE_MANUFACTURER
= 'VehicleManufacturer';
28 static ENTITY_VEHICLE_MANUFACTURERS
= 'VehicleManufacturers';
29 static ENTITY_VEHICLES
= 'Vehicles';
30 static ENTITY_VEHICLE
= 'Vehicle';
31 static ENTITY_LOGGINGS
= 'Loggings';
32 static ENTITY_LOGGING
= 'Logging';
33 static ENTITY_PRICING
= 'Pricing';
35 static NOTIF_TYPE_CHARGING_STATION_CONFIGURATION
= 'Configuration';
37 static ACTION_READ
= 'Read';
38 static ACTION_CREATE
= 'Create';
39 static ACTION_UPDATE
= 'Update';
40 static ACTION_DELETE
= 'Delete';
44 static CENTRAL_SERVER
= 'Central Server';
46 static WITH_CONNECTORS
= true;
47 static WITHOUT_CONNECTORS
= false;
49 static WITH_CHARGING_STATIONS
= true;
50 static WITHOUT_CHARGING_STATIONS
= false;
51 static WITH_SITE
= true;
52 static WITHOUT_SITE
= false;
54 static VEHICLE_TYPE_CAR
= 'C';
57 static USER_STATUS_PENDING
= 'P';
58 static USER_STATUS_ACTIVE
= 'A';
59 static USER_STATUS_DELETED
= 'D';
60 static USER_STATUS_INACTIVE
= 'I';
61 static USER_STATUS_BLOCKED
= 'B';
62 static USER_STATUS_LOCKED
= 'L';
65 static ROLE_SUPER_ADMIN
= 'S';
66 static ROLE_ADMIN
= 'A';
67 static ROLE_BASIC
= 'B';
68 static ROLE_DEMO
= 'D';
69 static ACTION_LOGOUT
= 'Logout';
70 static ACTION_LIST
= 'List';
71 static ACTION_RESET
= 'Reset';
72 static ACTION_AUTHORIZE
= 'Authorize';
73 static ACTION_CLEAR_CACHE
= 'ClearCache';
74 static ACTION_STOP_TRANSACTION
= 'StopTransaction';
75 static ACTION_START_TRANSACTION
= 'StartTransaction';
76 static ACTION_REFUND_TRANSACTION
= 'RefundTransaction';
77 static ACTION_UNLOCK_CONNECTOR
= 'UnlockConnector';
78 static ACTION_GET_CONFIGURATION
= 'GetConfiguration';
81 static PWD_MIN_LENGTH
= 15;
82 static PWD_MAX_LENGTH
= 20;
83 static PWD_UPPERCASE_MIN_COUNT
= 1;
84 static PWD_LOWERCASE_MIN_COUNT
= 1;
85 static PWD_NUMBER_MIN_COUNT
= 1;
86 static PWD_SPECIAL_MIN_COUNT
= 1;
88 static PWD_UPPERCASE_RE
= /([A-Z])/g;
89 static PWD_LOWERCASE_RE
= /([a-z])/g;
90 static PWD_NUMBER_RE
= /([\d])/g;
91 static PWD_SPECIAL_CHAR_RE
= /([!#$%^&*.?-])/g;
93 static DEFAULT_LOCALE
= 'en_US';
95 static ANONYMIZED_VALUE
= '####';
97 static DEFAULT_DB_LIMIT
= 100;
99 static METER_VALUE_CTX_SAMPLE_PERIODIC
= 'Sample.Periodic';
100 static METER_VALUE_CTX_SAMPLE_CLOCK
= 'Sample.Clock';
102 static WS_UNSUPPORTED_DATA
= 1007;
104 static OCPP_RESPONSE_ACCEPTED
= {status
: 'Accepted'};
105 static OCPP_RESPONSE_REJECTED
= {status
: 'Rejected'};
106 static OCPP_SOCKET_TIMEOUT
= 60000; // 60 sec
107 static OCPP_JSON_CALL_MESSAGE
= 2; // Client-to-Server
108 static OCPP_JSON_CALL_RESULT_MESSAGE
= 3; // Server-to-Client
109 static OCPP_JSON_CALL_ERROR_MESSAGE
= 4; // Server-to-Client
110 // Requested Action is not known by receiver
111 static OCPP_ERROR_NOT_IMPLEMENTED
= 'NotImplemented';
112 // Requested Action is recognized but not supported by the receiver
113 static OCPP_ERROR_NOT_SUPPORTED
= 'NotSupported';
114 // An internal error occurred and the receiver was not able to process the requested Action successfully
115 static OCPP_ERROR_INTERNAL_ERROR
= 'InternalError';
116 // Payload for Action is incomplete
117 static OCPP_ERROR_PROTOCOL_ERROR
= 'ProtocolError';
118 // During the processing of Action a security issue occurred preventing receiver from completing the Action successfully
119 static OCPP_ERROR_SECURITY_ERROR
= 'SecurityError';
120 // Payload for Action is syntactically incorrect or not conform the PDU structure for Action
121 static OCPP_ERROR_FORMATION_VIOLATION
= 'FormationViolation';
122 // Payload is syntactically correct but at least one field contains an invalid value
123 static OCPP_ERROR_PROPERTY_RAINT_VIOLATION
= 'PropertyraintViolation';
124 // Payload for Action is syntactically correct but at least one of the fields violates occurence raints
125 static OCPP_ERROR_OCCURENCE_RAINT_VIOLATION
= 'OccurenceraintViolation';
126 // Payload for Action is syntactically correct but at least one of the fields violates data type raints (e.g. “somestring” = 12)
127 static OCPP_ERROR_TYPERAINT_VIOLATION
= 'TyperaintViolation';
128 // Any other error not covered by the previous ones
129 static OCPP_ERROR_GENERIC_ERROR
= 'GenericError';
131 static OCPP_PROTOCOL_JSON
= 'json';
132 static OCPP_PROTOCOL_SOAP
= 'soap';
133 static OCPP_VERSION_12
= '1.2';
134 static OCPP_VERSION_15
= '1.5';
135 static OCPP_VERSION_16
= '1.6';
136 static OCPP_VERSION_20
= '2.0';
139 module
.exports
= Constants
;