@open-charging-cloud/chargy-core 0.14.4 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,42 @@ import type Decimal from 'decimal.js';
2
2
  import * as chargyLib from './chargyLib';
3
3
  import type { IPublicKey } from './IPublicKeyInfo';
4
4
  import type { IChargingSession } from './IChargeTransparencyRecord';
5
+ /**
6
+ * JSON text representation of a quantity, including its unit and any stated
7
+ * uncertainty, e.g. "22 kW" or "(230.00 ±0.12) V, k=2".
8
+ * These aliases document meaning; they do not validate syntax or dimensions.
9
+ * Parse and validate at the serialization boundary before doing arithmetic.
10
+ */
11
+ export type MetrologicalText = string;
12
+ export type Volt = MetrologicalText;
13
+ export type Ampere = MetrologicalText;
14
+ export type Watt = MetrologicalText;
15
+ export type WattHour = MetrologicalText;
16
+ export type Ohm = MetrologicalText;
17
+ export type Meter = MetrologicalText;
18
+ export type Second = MetrologicalText;
19
+ export type Kelvin = MetrologicalText;
20
+ /** ISO 8601 timestamp. A point in time, distinct from an elapsed duration. */
21
+ export type Timestamp = string;
22
+ /** ISO 8601 duration retained for existing fields, e.g. "PT1H". */
23
+ export type ISO8601Duration = string;
24
+ /** Calendar date without a time or UTC offset, e.g. "2026-09-06". */
25
+ export type CalendarDate = string;
26
+ /** Local time of day; interpreting a tariff also requires its time zone. */
27
+ export type LocalTime = string;
28
+ /** Numeric seconds in existing protocol/configuration fields; not mCBOR text. */
29
+ export type DurationSeconds = number;
30
+ /** Geographic coordinates retain the existing numeric degree representation. */
31
+ export type Degrees = number;
32
+ /** Legacy magnitude: its unit and decimal scale are stored separately. */
33
+ export type MeasurementMagnitude = Decimal;
34
+ export type UnitSymbol = string;
35
+ /** Decimal exponent attached to a legacy measurement magnitude. */
36
+ export type DecimalScale = number;
37
+ /** Fixed-unit OCPI restrictions, retained until a versioned migration. */
38
+ export type EnergyInKilowattHours = Decimal;
39
+ export type PowerInKilowatts = Decimal;
40
+ export type PowerType = "AC" | "DC";
5
41
  export declare function isGeoLocation(data: unknown): data is IGeoLocation;
6
42
  export type GetChargingPoolFunc = (Id: string) => IChargingPool | null;
7
43
  export type GetChargingStationFunc = (Id: string) => IChargingStation | null;
@@ -10,7 +46,7 @@ export type GetMeterFunc = (Id: string) => IEnergyMeter | null;
10
46
  export type CheckMeterPublicKeySignatureFunc = (chargingStation: IChargingStation | null | undefined, evse: IEVSE | null | undefined, energyMeter: IEnergyMeter | null | undefined, publicKey: IPublicKey | null | undefined, signature: unknown) => Promise<string>;
11
47
  export interface IContract {
12
48
  "@id": string;
13
- "@context"?: string | undefined;
49
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
14
50
  description?: chargyLib.I18NString | undefined;
15
51
  type?: string | undefined;
16
52
  username?: string | undefined;
@@ -22,21 +58,25 @@ export interface IKeyInfo {
22
58
  curve: string;
23
59
  value: string;
24
60
  }
61
+ /** A charging station operator */
25
62
  export interface IChargingStationOperator {
26
63
  "@id": string;
27
- "@context"?: string | undefined;
28
- subCSOIds?: Array<string> | undefined;
64
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
65
+ name?: chargyLib.I18NString | undefined;
29
66
  description?: chargyLib.I18NString | undefined;
67
+ subCSOIds?: Array<string> | undefined;
30
68
  contact: IContact;
31
69
  support: ISupport;
32
70
  privacy: IPrivacyContact;
33
71
  geoLocation?: IGeoLocation | undefined;
72
+ /** URLs to images / logos */
73
+ imageURLs?: string[] | undefined;
34
74
  chargingPools?: Array<IChargingPool> | undefined;
35
75
  chargingStations?: Array<IChargingStation> | undefined;
36
76
  EVSEs?: Array<IEVSE> | undefined;
37
- publicKeys?: Array<IPublicKey> | undefined;
38
77
  chargingTariffs?: Array<IChargingTariff> | undefined;
39
78
  parkingTariffs?: Array<IParkingTariff> | undefined;
79
+ publicKeys?: Array<IPublicKey> | undefined;
40
80
  }
41
81
  export interface IContact {
42
82
  email?: string | undefined;
@@ -64,89 +104,220 @@ export interface ISignature {
64
104
  previousValue?: string | undefined;
65
105
  value?: string | undefined;
66
106
  }
107
+ /** The document signature shape consumed by verifyDocumentSignatures. */
108
+ export interface IDocumentSignature extends ISignature {
109
+ keyId: string;
110
+ algorithm: string;
111
+ encodings: Array<string>;
112
+ value: string;
113
+ signedData?: {
114
+ encodings?: Array<string>;
115
+ excludedProperties?: Array<string>;
116
+ };
117
+ }
67
118
  export interface ISignatureRS extends ISignature {
68
119
  r: string;
69
120
  s: string;
70
121
  }
122
+ /** A charging pool */
71
123
  export interface IChargingPool {
72
124
  "@id": string;
73
- "@context"?: string | undefined;
125
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
74
126
  description?: chargyLib.I18NString | undefined;
75
127
  address?: IAddress | undefined;
76
128
  geoLocation?: IGeoLocation | undefined;
129
+ publicKeys?: Array<IPublicKey> | undefined;
130
+ chargingStationOperatorId?: string | undefined;
77
131
  chargingStationOperator?: IChargingStationOperator | undefined;
132
+ chargingPoolId?: string | undefined;
133
+ chargingPool?: IChargingPool | undefined;
134
+ chargingStationIds?: Array<string> | undefined;
78
135
  chargingStations?: Array<IChargingStation> | undefined;
136
+ chargingTariffIds?: Array<string> | undefined;
79
137
  chargingTariffs?: Array<IChargingTariff> | undefined;
138
+ }
139
+ /** A local controller within a charging pool controlling multiple
140
+ * charging stations for e.g. load balancing.
141
+ * Can have its own energy meters e.g. at the grid connection point.
142
+ */
143
+ export interface ILocalController {
144
+ "@id": string;
145
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
146
+ description?: chargyLib.I18NString | undefined;
147
+ manufacturer?: IManufacturer | undefined;
148
+ model?: IDeviceModel | undefined;
149
+ hardware?: IHardware | undefined;
150
+ firmware?: IFirmware | undefined;
151
+ legalCompliance?: ILegalCompliance | undefined;
152
+ /** URLs to images / logos */
153
+ imageURLs?: string[] | undefined;
154
+ energyMeterIds?: Array<string> | undefined;
155
+ energyMeters?: Array<IEnergyMeter> | undefined;
156
+ temperaturSensorIds?: Array<string> | undefined;
157
+ temperaturSensors?: Array<ITemperatureSensor> | undefined;
80
158
  publicKeys?: Array<IPublicKey> | undefined;
159
+ chargingStationOperatorId?: string | undefined;
160
+ chargingStationOperator?: IChargingStationOperator | undefined;
161
+ chargingPoolId?: string | undefined;
162
+ chargingPool?: IChargingPool | undefined;
81
163
  }
164
+ /** A charging station */
82
165
  export interface IChargingStation {
83
166
  "@id": string;
84
- "@context"?: string | undefined;
167
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
85
168
  description?: chargyLib.I18NString | undefined;
86
169
  manufacturer?: IManufacturer | undefined;
87
170
  model?: IDeviceModel | undefined;
88
171
  hardware?: IHardware | undefined;
89
172
  firmware?: IFirmware | undefined;
90
173
  legalCompliance?: ILegalCompliance | undefined;
174
+ /** The address of the charging station, when different from the charging pool */
91
175
  address?: IAddress | undefined;
176
+ /** The geographic position of the charging station, when different from the charging pool */
92
177
  geoLocation?: IGeoLocation | undefined;
93
- chargingStationOperator?: IChargingStationOperator | undefined;
94
- chargingPool?: IChargingPool | undefined;
95
- chargingPoolId?: string | undefined;
96
- EVSEs?: Array<IEVSE> | undefined;
178
+ /** URLs to images / logos */
179
+ imageURLs?: string[] | undefined;
97
180
  EVSEIds?: Array<string> | undefined;
181
+ EVSEs?: Array<IEVSE> | undefined;
182
+ energyMeterIds?: Array<string> | undefined;
98
183
  energyMeters?: Array<IEnergyMeter> | undefined;
184
+ chargingTariffIds?: Array<string> | undefined;
99
185
  chargingTariffs?: Array<IChargingTariff> | undefined;
186
+ temperaturSensorIds?: Array<string> | undefined;
187
+ temperaturSensors?: Array<ITemperatureSensor> | undefined;
100
188
  publicKeys?: Array<IPublicKey> | undefined;
189
+ chargingStationOperatorId?: string | undefined;
190
+ chargingStationOperator?: IChargingStationOperator | undefined;
191
+ chargingPoolId?: string | undefined;
192
+ chargingPool?: IChargingPool | undefined;
101
193
  }
194
+ /** A energy circuit within a charging station */
102
195
  export interface IEVSE {
103
196
  "@id": string;
104
- "@context"?: string | undefined;
197
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
105
198
  description?: chargyLib.I18NString | undefined;
106
- chargingPoolId?: string | undefined;
107
- chargingStation?: IChargingStation | undefined;
108
- chargingStationId?: string | undefined;
109
- energyMeters?: Array<IEnergyMeter> | undefined;
199
+ /** The power type, e.g. "AC" or "DC" */
200
+ powerType?: PowerType | undefined;
201
+ /** The maximum electrical power as metrological value with unit, e.g. "22 kW" */
202
+ maxPower?: Watt | undefined;
203
+ connectorIds?: Array<string> | undefined;
110
204
  connectors?: Array<IConnector> | undefined;
111
- publicKeys?: Array<IPublicKey> | undefined;
205
+ energyMeterIds?: Array<string> | undefined;
206
+ energyMeters?: Array<IEnergyMeter> | undefined;
207
+ chargingTariffIds?: Array<string> | undefined;
112
208
  chargingTariffs?: Array<IChargingTariff> | undefined;
209
+ temperaturSensorIds?: Array<string> | undefined;
210
+ temperaturSensors?: Array<ITemperatureSensor> | undefined;
211
+ publicKeys?: Array<IPublicKey> | undefined;
212
+ chargingStationOperatorId?: string | undefined;
213
+ chargingStationOperator?: IChargingStationOperator | undefined;
214
+ chargingPoolId?: string | undefined;
215
+ chargingPool?: IChargingPool | undefined;
216
+ chargingStationId?: string | undefined;
217
+ chargingStation?: IChargingStation | undefined;
113
218
  }
219
+ /** A engery meter */
114
220
  export interface IEnergyMeter {
115
221
  "@id": string;
116
- "@context"?: string | undefined;
222
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
117
223
  description?: chargyLib.I18NString | undefined;
224
+ /** URLs to images / logos */
225
+ imageURLs?: string[];
118
226
  manufacturer?: IManufacturer | undefined;
119
227
  model?: IDeviceModel | undefined;
120
228
  firmware?: IFirmware | undefined;
121
229
  hardware?: IHardware | undefined;
122
230
  legalCompliance?: ILegalCompliance | undefined;
231
+ /** The power type, e.g. "AC" or "DC" */
232
+ powerType?: PowerType | undefined;
233
+ temperaturSensorIds?: Array<string> | undefined;
234
+ temperaturSensors?: Array<ITemperatureSensor> | undefined;
235
+ signatureInfos?: ISignatureInfos | undefined;
236
+ signatureFormat?: string | undefined;
237
+ publicKeys?: Array<IPublicKey> | undefined;
123
238
  chargingPoolId?: string | undefined;
124
239
  chargingPool?: IChargingPool | undefined;
125
240
  chargingStationId?: string | undefined;
126
241
  chargingStation?: IChargingStation | undefined;
127
242
  EVSEId?: string | undefined;
128
243
  EVSE?: IEVSE | undefined;
129
- signatureInfos?: ISignatureInfos | undefined;
130
- signatureFormat?: string | undefined;
131
- publicKeys?: Array<IPublicKey> | undefined;
244
+ cableId?: string | undefined;
245
+ cable?: ICable | undefined;
132
246
  }
247
+ /** A charging connector */
133
248
  export interface IConnector {
249
+ /** The internal id of the connector, e.g. used by OCPI */
134
250
  "@id"?: string | undefined;
251
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
252
+ /** The visible label of the connector */
253
+ visibleLabel?: string | undefined;
254
+ standard?: string | undefined;
255
+ format?: string | undefined;
256
+ /** Legacy connector designation used by existing importers. */
135
257
  type?: string | undefined;
258
+ /** Retain provider-specific power-type names on legacy connectors. */
259
+ powerType?: string | undefined;
260
+ /** The metrological power with unit, e.g. "22 kW" */
261
+ maxPower?: Watt;
262
+ temperaturSensors?: Array<ITemperatureSensor> | undefined;
136
263
  cable?: ICable | undefined;
137
264
  }
265
+ export declare function isConnector(data: unknown): data is IConnector;
266
+ /** A charging cable, maybe with a plug full of (ISO 15118-20) electronics */
138
267
  export interface ICable {
139
- length?: number | undefined;
268
+ "@id"?: string | undefined;
269
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
270
+ description?: chargyLib.I18NString | undefined;
271
+ /** URLs to images / logos */
272
+ imageURLs?: string[];
273
+ manufacturer?: IManufacturer | undefined;
274
+ model?: IDeviceModel | undefined;
275
+ firmware?: IFirmware | undefined;
276
+ hardware?: IHardware | undefined;
277
+ legalCompliance?: ILegalCompliance | undefined;
278
+ /** Quantity text for native documents; numeric metres from legacy importers. */
279
+ length?: Meter | number | undefined;
280
+ /** Quantity text, or the unmodified magnitude of a foreign import format. */
281
+ resistance?: Ohm | number | undefined;
282
+ /** Unit accompanying a legacy numeric resistance; foreign formats retain their spelling. */
283
+ resistanceUnit?: UnitSymbol | undefined;
140
284
  lossCompensation?: string | undefined;
141
285
  lossCompensationId?: string | undefined;
142
- resistance?: number | undefined;
143
- resistanceUnit?: string | undefined;
286
+ temperaturSensors?: Array<ITemperatureSensor> | undefined;
287
+ }
288
+ /** Native quantity-text cable profile, without a second unit field. */
289
+ export interface IMetrologicalCable extends ICable {
290
+ length?: Meter | undefined;
291
+ resistance?: Ohm | undefined;
292
+ resistanceUnit?: never;
293
+ }
294
+ /** A temperature sensor */
295
+ export interface ITemperatureSensor {
296
+ "@id": string;
297
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
298
+ description?: chargyLib.I18NString | undefined;
299
+ /** URLs to images / logos */
300
+ imageURLs?: string[];
301
+ manufacturer?: IManufacturer | undefined;
302
+ model?: IDeviceModel | undefined;
303
+ firmware?: IFirmware | undefined;
304
+ hardware?: IHardware | undefined;
305
+ legalCompliance?: ILegalCompliance | undefined;
306
+ chargingStationId?: string | undefined;
307
+ chargingStation?: IChargingStation | undefined;
308
+ EVSEId?: string | undefined;
309
+ EVSE?: IEVSE | undefined;
310
+ cableId?: string | undefined;
311
+ cable?: ICable | undefined;
312
+ signatureInfos?: ISignatureInfos | undefined;
313
+ signatureFormat?: string | undefined;
314
+ publicKeys?: Array<IPublicKey> | undefined;
144
315
  }
145
316
  export interface IConformity {
146
317
  certificateId: string;
147
318
  url?: string;
148
- notBefore: string;
149
- notAfter: string;
319
+ notBefore: Timestamp;
320
+ notAfter: Timestamp;
150
321
  officialSoftware?: Array<ITransparencySoftware>;
151
322
  compatibleSoftware?: Array<ITransparencySoftware>;
152
323
  freeText: string;
@@ -154,8 +325,8 @@ export interface IConformity {
154
325
  export interface ICalibration {
155
326
  certificateId: string;
156
327
  url?: string;
157
- notBefore: string;
158
- notAfter: string;
328
+ notBefore: Timestamp;
329
+ notAfter: Timestamp;
159
330
  freeText: string;
160
331
  }
161
332
  export interface ILegalCompliance {
@@ -166,26 +337,26 @@ export interface ILegalCompliance {
166
337
  }
167
338
  export interface IEMobilityProvider {
168
339
  "@id": string;
169
- "@context"?: string;
340
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
170
341
  description: chargyLib.I18NString;
171
342
  chargingTariffs: Array<IChargingTariff>;
172
343
  publicKeys?: Array<IPublicKey>;
173
344
  }
174
345
  export interface ITaxes {
175
346
  "@id": string;
176
- "@context"?: string;
347
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
177
348
  description?: chargyLib.I18NString;
178
349
  percentage: number;
179
350
  }
180
351
  export interface IMediationService {
181
352
  "@id": string;
182
- "@context"?: string;
353
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
183
354
  description: chargyLib.I18NString;
184
355
  publicKeys?: Array<IPublicKey>;
185
356
  }
186
357
  export interface IChargingProduct {
187
358
  "@id": string;
188
- "@context"?: string;
359
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
189
360
  }
190
361
  export interface IChargingCosts {
191
362
  total: number;
@@ -207,8 +378,8 @@ export interface IFlatCost {
207
378
  export interface IParking {
208
379
  "@id": string;
209
380
  "@context"?: string;
210
- begin: string;
211
- end?: string;
381
+ begin: Timestamp;
382
+ end?: Timestamp;
212
383
  overstay?: boolean;
213
384
  }
214
385
  export interface ITransparencySoftware {
@@ -227,7 +398,7 @@ export interface IAuthorization {
227
398
  "@id": string;
228
399
  "@context"?: string;
229
400
  type?: string;
230
- timestamp?: string;
401
+ timestamp?: Timestamp;
231
402
  chargingStationOperator?: string;
232
403
  roamingNetwork?: string;
233
404
  eMobilityProvider?: string;
@@ -310,7 +481,7 @@ export interface ICryptoResult {
310
481
  }
311
482
  export declare function isICryptoResult(obj: unknown): obj is ICryptoResult;
312
483
  export interface IAddress {
313
- "@context"?: string;
484
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
314
485
  city: string | undefined;
315
486
  street?: string | undefined;
316
487
  houseNumber?: string | undefined;
@@ -320,8 +491,8 @@ export interface IAddress {
320
491
  comment?: chargyLib.I18NString | undefined;
321
492
  }
322
493
  export interface IGeoLocation {
323
- lat: number;
324
- lng: number;
494
+ lat: Degrees;
495
+ lng: Degrees;
325
496
  }
326
497
  export interface IChargingProductRelevance {
327
498
  time?: InformationRelevance | string;
@@ -407,7 +578,7 @@ export interface ICryptoHashes {
407
578
  }
408
579
  export interface IVersionSignature {
409
580
  signer: string;
410
- timestamp: string;
581
+ timestamp: Timestamp;
411
582
  publicKey: string;
412
583
  algorithm: string;
413
584
  format: string;
@@ -450,9 +621,9 @@ export interface IFileInfo {
450
621
  exception?: unknown;
451
622
  }
452
623
  export interface IChargingPeriod {
453
- startTimestamp: string;
454
- stopTimestamp?: string;
455
- endTimestamp?: string;
624
+ startTimestamp: Timestamp;
625
+ stopTimestamp?: Timestamp;
626
+ endTimestamp?: Timestamp;
456
627
  chargingTariffId: string;
457
628
  activeChargingTariffElement?: IChargingTariffElement;
458
629
  costs: IChargingCosts;
@@ -467,16 +638,16 @@ export declare enum DayOfWeek {
467
638
  Saturday = 6
468
639
  }
469
640
  export interface ITariffRestriction {
470
- start_time?: string | undefined;
471
- end_time?: string | undefined;
472
- start_date?: string | undefined;
473
- end_date?: string | undefined;
474
- min_kwh?: Decimal | undefined;
475
- max_kwh?: Decimal | undefined;
476
- min_power?: Decimal | undefined;
477
- max_power?: Decimal | undefined;
478
- min_duration?: number | undefined;
479
- max_duration?: number | undefined;
641
+ start_time?: LocalTime | undefined;
642
+ end_time?: LocalTime | undefined;
643
+ start_date?: CalendarDate | undefined;
644
+ end_date?: CalendarDate | undefined;
645
+ min_kwh?: EnergyInKilowattHours | undefined;
646
+ max_kwh?: EnergyInKilowattHours | undefined;
647
+ min_power?: PowerInKilowatts | undefined;
648
+ max_power?: PowerInKilowatts | undefined;
649
+ min_duration?: DurationSeconds | undefined;
650
+ max_duration?: DurationSeconds | undefined;
480
651
  day_of_week?: Array<DayOfWeek> | undefined;
481
652
  }
482
653
  export interface IPriceComponent {
@@ -494,7 +665,7 @@ export interface IDisplayText {
494
665
  }
495
666
  export interface IChargingTariff {
496
667
  "@id": string;
497
- "@context"?: string | Array<string>;
668
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
498
669
  country_code?: string;
499
670
  party_id?: string;
500
671
  shortName?: chargyLib.I18NString;
@@ -503,15 +674,15 @@ export interface IChargingTariff {
503
674
  currency?: string;
504
675
  taxes?: Array<ITaxes>;
505
676
  elements?: Array<IChargingTariffElement>;
506
- not_before?: string;
507
- not_after?: string;
508
- created?: string;
509
- last_updated?: string;
677
+ not_before?: Timestamp;
678
+ not_after?: Timestamp;
679
+ created?: Timestamp;
680
+ last_updated?: Timestamp;
510
681
  signatures?: Array<ISignatureRS>;
511
682
  }
512
683
  export interface IParkingTariff {
513
684
  "@id": string;
514
- "@context"?: string | Array<string>;
685
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
515
686
  country_code?: string;
516
687
  party_id?: string;
517
688
  description?: chargyLib.I18NString;
@@ -520,15 +691,15 @@ export interface IParkingTariff {
520
691
  currency?: string;
521
692
  taxes?: Array<ITaxes>;
522
693
  elements?: Array<IChargingTariffElement>;
523
- not_before?: string;
524
- not_after?: string;
525
- created?: string;
526
- last_updated?: string;
694
+ not_before?: Timestamp;
695
+ not_after?: Timestamp;
696
+ created?: Timestamp;
697
+ last_updated?: Timestamp;
527
698
  signatures?: Array<ISignatureRS>;
528
699
  }
529
700
  export type ShowPKIDetailsFunction = (pkiData: unknown) => void;
530
701
  export type IssueReportPayload = {
531
- timestamp: string;
702
+ timestamp: Timestamp;
532
703
  chargyVersion: string;
533
704
  platform: string;
534
705
  invalidCTR: boolean;
@@ -545,7 +716,7 @@ export type IssueReportPayload = {
545
716
  eMail: string;
546
717
  };
547
718
  export interface IManufacturer {
548
- "@context"?: string;
719
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
549
720
  name: string | undefined;
550
721
  url?: string | undefined;
551
722
  description?: chargyLib.I18NString;
@@ -556,19 +727,19 @@ export interface IManufacturer {
556
727
  publicKeys?: Array<IPublicKey>;
557
728
  }
558
729
  export interface IDeviceModel {
559
- "@context"?: string;
730
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
560
731
  name?: string | undefined;
561
732
  url?: string | undefined;
562
733
  }
563
734
  export interface IHardware {
564
735
  revision?: string | undefined;
565
- "@context"?: string;
736
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
566
737
  url?: string | undefined;
567
738
  serialNumber?: string | undefined;
568
739
  }
569
740
  export interface IFirmware {
570
741
  version?: string | undefined;
571
- "@context"?: string;
742
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
572
743
  releaseDate?: string | undefined;
573
744
  url?: string | undefined;
574
745
  components?: Array<IFirmwareComponent>;
@@ -577,7 +748,7 @@ export interface IFirmware {
577
748
  }
578
749
  export interface IFirmwareComponent {
579
750
  "@id": string | undefined;
580
- "@context"?: string;
751
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
581
752
  description?: chargyLib.I18NString | undefined;
582
753
  version: string | undefined;
583
754
  releaseDate?: string | undefined;
@@ -593,4 +764,62 @@ export interface IContainerInfos {
593
764
  chargingSessions?: Array<IChargingSession> | undefined;
594
765
  warnings?: Array<IWarning> | undefined;
595
766
  }
767
+ export interface ITimeSource {
768
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
769
+ isLegalTime?: boolean | undefined;
770
+ authority?: string | undefined;
771
+ accuracy?: Second | undefined;
772
+ stratum?: number | undefined;
773
+ syncInterval?: ISO8601Duration | undefined;
774
+ lastSynchronization?: Timestamp | undefined;
775
+ minServers?: number | undefined;
776
+ autoConfURL?: string | undefined;
777
+ servers: Array<ITimeServer>;
778
+ }
779
+ export interface ITimeServer {
780
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
781
+ server: URL;
782
+ priority?: number | undefined;
783
+ weight?: number | undefined;
784
+ }
785
+ export interface ILegallyRelevantLogMessage {
786
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
787
+ chargingSession?: IChargingSession | undefined;
788
+ timestamp: Timestamp;
789
+ code?: string | undefined;
790
+ data?: chargyLib.JSONObject | undefined;
791
+ text?: chargyLib.I18NString | undefined;
792
+ signatures?: Array<ISignature | ISignatureRS> | undefined;
793
+ }
794
+ export interface ISupportMessage {
795
+ "@id": string;
796
+ "@context"?: LinkedDataContext | Array<LinkedDataContext> | undefined;
797
+ chargingSession?: IChargingSession | undefined;
798
+ timestamp: Timestamp;
799
+ text?: chargyLib.I18NString | undefined;
800
+ data?: chargyLib.JSONObject | undefined;
801
+ signatures?: Array<ISignature | ISignatureRS> | undefined;
802
+ }
803
+ /** Time-based One-Time Password configuration
804
+ * see also: https://github.com/OpenChargingCloud/TOTP.TS
805
+ * https://www.npmjs.com/package/@open-charging-cloud/totp
806
+ */
807
+ export interface TOTPConfig {
808
+ sharedSecret: string | undefined;
809
+ timeStep?: DurationSeconds | undefined;
810
+ validityTime?: DurationSeconds | undefined;
811
+ totpLength?: number | undefined;
812
+ alphabet?: string | undefined;
813
+ timestamp?: Timestamp | undefined;
814
+ hashAlgorithm?: string | undefined;
815
+ }
816
+ export declare function isTOTPConfig(data: unknown): data is TOTPConfig;
817
+ export type URL = string;
818
+ export interface IURL {
819
+ url: URL;
820
+ priority?: number | undefined;
821
+ weight?: number | undefined;
822
+ }
823
+ export declare function isURL(data: unknown): data is IURL | URL;
824
+ export type LinkedDataContext = string;
596
825
  //# sourceMappingURL=chargyInterfaces.d.ts.map