refactor: factor out change availability helper
[e-mobility-charging-stations-simulator.git] / src / types / ocpp / Configuration.ts
... / ...
CommitLineData
1import {
2 OCPP16StandardParametersKey,
3 OCPP16SupportedFeatureProfiles,
4 OCPP16VendorParametersKey,
5} from './1.6/Configuration';
6import {
7 OCPP20OptionalVariableName,
8 OCPP20RequiredVariableName,
9 OCPP20VendorVariableName,
10} from './2.0/Variables';
11import type { JsonObject } from '../JsonType';
12
13export const StandardParametersKey = {
14 ...OCPP16StandardParametersKey,
15 ...OCPP20RequiredVariableName,
16 ...OCPP20OptionalVariableName,
17} as const;
18export type StandardParametersKey = OCPP16StandardParametersKey;
19
20export const VendorParametersKey = {
21 ...OCPP16VendorParametersKey,
22 ...OCPP20VendorVariableName,
23} as const;
24export type VendorParametersKey = OCPP16VendorParametersKey;
25
26export const SupportedFeatureProfiles = {
27 ...OCPP16SupportedFeatureProfiles,
28} as const;
29export type SupportedFeatureProfiles = OCPP16SupportedFeatureProfiles;
30
31export enum ConnectorPhaseRotation {
32 NotApplicable = 'NotApplicable',
33 Unknown = 'Unknown',
34 RST = 'RST',
35 RTS = 'RTS',
36 SRT = 'SRT',
37 STR = 'STR',
38 TRS = 'TRS',
39 TSR = 'TSR',
40}
41
42export type ConfigurationKeyType = string | StandardParametersKey | VendorParametersKey;
43
44export type OCPPConfigurationKey = {
45 key: ConfigurationKeyType;
46 readonly: boolean;
47 value?: string;
48} & JsonObject;