build(deps-dev): apply updates
[e-mobility-charging-stations-simulator.git] / src / types / ChargingStationTemplate.ts
CommitLineData
66a7748d 1import type { ClientRequestArgs } from 'node:http'
8114d10e 2
66a7748d 3import type { ClientOptions } from 'ws'
8114d10e 4
66a7748d
JB
5import type { AutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator.js'
6import type { ChargingStationOcppConfiguration } from './ChargingStationOcppConfiguration.js'
7import type { ConnectorStatus } from './ConnectorStatus.js'
8import type { EvseTemplate } from './Evse.js'
f4b3f35d 9import type { JsonObject } from './JsonType.js'
66a7748d
JB
10import type { OCPPProtocol } from './ocpp/OCPPProtocol.js'
11import type { OCPPVersion } from './ocpp/OCPPVersion.js'
d4c84337
JB
12import type {
13 FirmwareStatus,
14 IncomingRequestCommand,
15 MessageTrigger,
66a7748d
JB
16 RequestCommand
17} from './ocpp/Requests.js'
9ac86a7e 18
4c2b4904 19export enum CurrentType {
9ac86a7e 20 AC = 'AC',
a223d9be 21 DC = 'DC'
9ac86a7e
JB
22}
23
a02da55f 24export enum PowerUnits {
9ac86a7e 25 WATT = 'W',
a223d9be 26 KILO_WATT = 'kW'
9ac86a7e
JB
27}
28
cc6e8ab5
JB
29export enum AmpereUnits {
30 MILLI_AMPERE = 'mA',
31 CENTI_AMPERE = 'cA',
32 DECI_AMPERE = 'dA',
a223d9be 33 AMPERE = 'A'
cc6e8ab5
JB
34}
35
4c2b4904 36export enum Voltage {
84d4e562
JB
37 VOLTAGE_110 = 110,
38 VOLTAGE_230 = 230,
fd0c36fa 39 VOLTAGE_400 = 400,
a223d9be 40 VOLTAGE_800 = 800
84d4e562
JB
41}
42
66a7748d 43export type WsOptions = ClientOptions & ClientRequestArgs
2484ac1e 44
f4b3f35d 45export interface FirmwareUpgrade extends JsonObject {
15748260 46 versionUpgrade?: {
66a7748d
JB
47 patternGroup?: number
48 step?: number
49 }
50 reset?: boolean
51 failureStatus?: FirmwareStatus
e1d9a0f4 52}
b25b8684 53
f4b3f35d 54interface CommandsSupport extends JsonObject {
66a7748d
JB
55 incomingCommands: Record<IncomingRequestCommand, boolean>
56 outgoingCommands?: Record<RequestCommand, boolean>
e1d9a0f4 57}
65554cc3 58
d4d65733
JB
59enum x509CertificateType {
60 V2GRootCertificate = 'V2GRootCertificate',
61 MORootCertificate = 'MORootCertificate',
62 CSMSRootCertificate = 'CSMSRootCertificate',
63 ManufacturerRootCertificate = 'ManufacturerRootCertificate',
64 ChargingStationCertificate = 'ChargingStationCertificate',
a223d9be 65 V2GCertificate = 'V2GCertificate'
d4d65733
JB
66}
67
e1d9a0f4 68export interface ChargingStationTemplate {
66a7748d
JB
69 templateHash?: string
70 supervisionUrls?: string | string[]
71 supervisionUrlOcppConfiguration?: boolean
72 supervisionUrlOcppKey?: string
73 supervisionUser?: string
74 supervisionPassword?: string
244c1396 75 autoStart?: boolean
66a7748d
JB
76 ocppVersion?: OCPPVersion
77 ocppProtocol?: OCPPProtocol
78 ocppStrictCompliance?: boolean
79 ocppPersistentConfiguration?: boolean
80 stationInfoPersistentConfiguration?: boolean
81 automaticTransactionGeneratorPersistentConfiguration?: boolean
82 wsOptions?: WsOptions
83 idTagsFile?: string
84 baseName: string
85 nameSuffix?: string
86 fixedName?: boolean
87 chargePointModel: string
88 chargePointVendor: string
89 chargePointSerialNumberPrefix?: string
90 chargeBoxSerialNumberPrefix?: string
91 firmwareVersionPattern?: string
92 firmwareVersion?: string
93 firmwareUpgrade?: FirmwareUpgrade
94 iccid?: string
95 imsi?: string
96 meterSerialNumberPrefix?: string
97 meterType?: string
98 power?: number | number[]
99 powerUnit?: PowerUnits
100 powerSharedByConnectors?: boolean
101 currentOutType?: CurrentType
102 voltageOut?: Voltage
103 numberOfPhases?: number
104 numberOfConnectors?: number | number[]
105 useConnectorId0?: boolean
106 randomConnectors?: boolean
107 resetTime?: number
108 autoRegister?: boolean
109 autoReconnectMaxRetries?: number
110 reconnectExponentialDelay?: boolean
111 registrationMaxRetries?: number
112 enableStatistics?: boolean
113 remoteAuthorization?: boolean
da47bc29 114 /** @deprecated Replaced by remoteAuthorization. */
66a7748d 115 mustAuthorizeAtRemoteStart?: boolean
da47bc29 116 /** @deprecated Replaced by ocppStrictCompliance. */
66a7748d
JB
117 payloadSchemaValidation?: boolean
118 amperageLimitationOcppKey?: string
119 amperageLimitationUnit?: AmpereUnits
120 beginEndMeterValues?: boolean
121 outOfOrderEndMeterValues?: boolean
122 meteringPerTransaction?: boolean
123 transactionDataMeterValues?: boolean
124 stopTransactionsOnStopped?: boolean
125 mainVoltageMeterValues?: boolean
126 phaseLineToLineVoltageMeterValues?: boolean
127 customValueLimitationMeterValues?: boolean
128 commandsSupport?: CommandsSupport
129 messageTriggerSupport?: Record<MessageTrigger, boolean>
130 Configuration?: ChargingStationOcppConfiguration
131 AutomaticTransactionGenerator?: AutomaticTransactionGeneratorConfiguration
132 Evses?: Record<string, EvseTemplate>
133 Connectors?: Record<string, ConnectorStatus>
134 x509Certificates?: Record<x509CertificateType, string>
e1d9a0f4 135}