@open-charging-cloud/chargy-core 0.5.0 → 0.6.1
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.
- package/README.md +1 -1
- package/dist/BSMCrypt01.d.ts.map +1 -1
- package/dist/Mennekes.d.ts.map +1 -1
- package/dist/browser/index.js +384 -320
- package/dist/browser/index.js.map +1 -1
- package/dist/chargy.d.ts +8 -3
- package/dist/chargy.d.ts.map +1 -1
- package/dist/interfaces/IChargeTransparencyRecord.d.ts +2 -2
- package/dist/interfaces/IChargeTransparencyRecord.d.ts.map +1 -1
- package/dist/interfaces/chargyInterfaces.d.ts +19 -7
- package/dist/interfaces/chargyInterfaces.d.ts.map +1 -1
- package/dist/node/index.js +384 -320
- package/dist/node/index.js.map +1 -1
- package/dist/verificationResults.d.ts +2 -1
- package/dist/verificationResults.d.ts.map +1 -1
- package/i18n.json +40 -0
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -9873,10 +9873,12 @@ var secp224k1 = class {
|
|
|
9873
9873
|
// src/interfaces/chargyInterfaces.ts
|
|
9874
9874
|
var chargyInterfaces_exports = {};
|
|
9875
9875
|
__export(chargyInterfaces_exports, {
|
|
9876
|
+
CreateError: () => CreateError,
|
|
9876
9877
|
CryptoAlgorithms: () => CryptoAlgorithms,
|
|
9877
9878
|
CryptoHashAlgorithms: () => CryptoHashAlgorithms,
|
|
9878
9879
|
DayOfWeek: () => DayOfWeek,
|
|
9879
9880
|
DisplayPrefixes: () => DisplayPrefixes,
|
|
9881
|
+
ErrorLevel: () => ErrorLevel,
|
|
9880
9882
|
IECCurves: () => IECCurves,
|
|
9881
9883
|
IEncoding: () => IEncoding,
|
|
9882
9884
|
InformationRelevance: () => InformationRelevance,
|
|
@@ -9980,6 +9982,18 @@ var WarningLevel = /* @__PURE__ */ ((WarningLevel2) => {
|
|
|
9980
9982
|
WarningLevel2["high"] = "high";
|
|
9981
9983
|
return WarningLevel2;
|
|
9982
9984
|
})(WarningLevel || {});
|
|
9985
|
+
var ErrorLevel = /* @__PURE__ */ ((ErrorLevel2) => {
|
|
9986
|
+
ErrorLevel2["low"] = "low";
|
|
9987
|
+
ErrorLevel2["medium"] = "medium";
|
|
9988
|
+
ErrorLevel2["high"] = "high";
|
|
9989
|
+
return ErrorLevel2;
|
|
9990
|
+
})(ErrorLevel || {});
|
|
9991
|
+
function CreateError(message, level = "high" /* high */) {
|
|
9992
|
+
return {
|
|
9993
|
+
level,
|
|
9994
|
+
message
|
|
9995
|
+
};
|
|
9996
|
+
}
|
|
9983
9997
|
function isISessionCryptoResult1(obj) {
|
|
9984
9998
|
return typeof obj === "object" && obj !== null && obj.status !== void 0;
|
|
9985
9999
|
}
|
|
@@ -10783,7 +10797,7 @@ var Alfen = class {
|
|
|
10783
10797
|
if (elements?.length != 6 && elements?.length != 7)
|
|
10784
10798
|
return {
|
|
10785
10799
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
10786
|
-
message: this.chargy.
|
|
10800
|
+
message: this.chargy.GetMultilanguageText("Invalid number of signed meter values!"),
|
|
10787
10801
|
certainty: 0
|
|
10788
10802
|
};
|
|
10789
10803
|
const FormatId = elements[0];
|
|
@@ -10797,13 +10811,13 @@ var Alfen = class {
|
|
|
10797
10811
|
else if (elements[3] !== common.PublicKey)
|
|
10798
10812
|
return {
|
|
10799
10813
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
10800
|
-
message: this.chargy.
|
|
10814
|
+
message: this.chargy.GetMultilanguageText("Inconsistent public keys!"),
|
|
10801
10815
|
certainty: 0
|
|
10802
10816
|
};
|
|
10803
10817
|
if (FormatId !== "AP" || Type?.length !== 1 || BlobVersion?.length !== 1 || BlobVersion !== "3" || PublicKey.byteLength !== 25 || DataSet.byteLength !== 82 || Signature.byteLength !== 48) {
|
|
10804
10818
|
return {
|
|
10805
10819
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
10806
|
-
message: this.chargy.
|
|
10820
|
+
message: this.chargy.GetMultilanguageText("Invalid charging session format!"),
|
|
10807
10821
|
certainty: 0
|
|
10808
10822
|
};
|
|
10809
10823
|
}
|
|
@@ -10828,7 +10842,7 @@ var Alfen = class {
|
|
|
10828
10842
|
else if (AdapterId !== common.AdapterId)
|
|
10829
10843
|
return {
|
|
10830
10844
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
10831
|
-
message: this.chargy.
|
|
10845
|
+
message: this.chargy.GetMultilanguageText("Inconsistent Alfen adapter identification!"),
|
|
10832
10846
|
certainty: 0
|
|
10833
10847
|
};
|
|
10834
10848
|
if (common.AdapterFWVersion === "")
|
|
@@ -10836,7 +10850,7 @@ var Alfen = class {
|
|
|
10836
10850
|
else if (AdapterFWVersion !== common.AdapterFWVersion)
|
|
10837
10851
|
return {
|
|
10838
10852
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
10839
|
-
message: this.chargy.
|
|
10853
|
+
message: this.chargy.GetMultilanguageText("Inconsistent Alfen adapter firmware version!"),
|
|
10840
10854
|
certainty: 0
|
|
10841
10855
|
};
|
|
10842
10856
|
if (common.AdapterFWChecksum === "")
|
|
@@ -10844,7 +10858,7 @@ var Alfen = class {
|
|
|
10844
10858
|
else if (AdapterFWChecksum !== common.AdapterFWChecksum)
|
|
10845
10859
|
return {
|
|
10846
10860
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
10847
|
-
message: this.chargy.
|
|
10861
|
+
message: this.chargy.GetMultilanguageText("Inconsistent Alfen adapter firmware checksum!"),
|
|
10848
10862
|
certainty: 0
|
|
10849
10863
|
};
|
|
10850
10864
|
if (common.MeterId === "")
|
|
@@ -10852,7 +10866,7 @@ var Alfen = class {
|
|
|
10852
10866
|
else if (MeterId !== common.MeterId)
|
|
10853
10867
|
return {
|
|
10854
10868
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
10855
|
-
message: this.chargy.
|
|
10869
|
+
message: this.chargy.GetMultilanguageText("Inconsistent meter identification!"),
|
|
10856
10870
|
certainty: 0
|
|
10857
10871
|
};
|
|
10858
10872
|
if (common.ObisId === "")
|
|
@@ -10860,7 +10874,7 @@ var Alfen = class {
|
|
|
10860
10874
|
else if (ObisId !== common.ObisId)
|
|
10861
10875
|
return {
|
|
10862
10876
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
10863
|
-
message: this.chargy.
|
|
10877
|
+
message: this.chargy.GetMultilanguageText("Inconsistent OBIS code!"),
|
|
10864
10878
|
certainty: 0
|
|
10865
10879
|
};
|
|
10866
10880
|
if (common.UnitEncoded === 0)
|
|
@@ -10868,7 +10882,7 @@ var Alfen = class {
|
|
|
10868
10882
|
else if (UnitEncoded !== common.UnitEncoded)
|
|
10869
10883
|
return {
|
|
10870
10884
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
10871
|
-
message: this.chargy.
|
|
10885
|
+
message: this.chargy.GetMultilanguageText("Inconsistent unit (encoded) value!"),
|
|
10872
10886
|
certainty: 0
|
|
10873
10887
|
};
|
|
10874
10888
|
if (common.Scalar === "")
|
|
@@ -10876,7 +10890,7 @@ var Alfen = class {
|
|
|
10876
10890
|
else if (Scalar !== common.Scalar)
|
|
10877
10891
|
return {
|
|
10878
10892
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
10879
|
-
message: this.chargy.
|
|
10893
|
+
message: this.chargy.GetMultilanguageText("Inconsistent measurement scalar!"),
|
|
10880
10894
|
certainty: 0
|
|
10881
10895
|
};
|
|
10882
10896
|
if (common.UID === "")
|
|
@@ -10884,7 +10898,7 @@ var Alfen = class {
|
|
|
10884
10898
|
else if (UID !== common.UID)
|
|
10885
10899
|
return {
|
|
10886
10900
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
10887
|
-
message: this.chargy.
|
|
10901
|
+
message: this.chargy.GetMultilanguageText("Inconsistent user identification!"),
|
|
10888
10902
|
certainty: 0
|
|
10889
10903
|
};
|
|
10890
10904
|
if (common.InternalSessionId === 0)
|
|
@@ -10892,13 +10906,13 @@ var Alfen = class {
|
|
|
10892
10906
|
else if (InternalSessionId !== common.InternalSessionId)
|
|
10893
10907
|
return {
|
|
10894
10908
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
10895
|
-
message: this.chargy.
|
|
10909
|
+
message: this.chargy.GetMultilanguageText("Inconsistent internal charging session identification!"),
|
|
10896
10910
|
certainty: 0
|
|
10897
10911
|
};
|
|
10898
10912
|
if (previousTimestamp !== "" && previousTimestamp > Timestamp)
|
|
10899
10913
|
return {
|
|
10900
10914
|
status: "InconsistentTimestamps" /* InconsistentTimestamps */,
|
|
10901
|
-
message: this.chargy.
|
|
10915
|
+
message: this.chargy.GetMultilanguageText("Inconsistent timestamps!"),
|
|
10902
10916
|
certainty: 0
|
|
10903
10917
|
};
|
|
10904
10918
|
else
|
|
@@ -10922,7 +10936,7 @@ var Alfen = class {
|
|
|
10922
10936
|
if (firstDataSet === void 0 || lastDataSet === void 0)
|
|
10923
10937
|
return {
|
|
10924
10938
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
10925
|
-
message: this.chargy.
|
|
10939
|
+
message: this.chargy.GetMultilanguageText("Invalid number of signed meter values!"),
|
|
10926
10940
|
certainty: 0
|
|
10927
10941
|
};
|
|
10928
10942
|
const _CTR = {
|
|
@@ -11054,7 +11068,7 @@ var Alfen = class {
|
|
|
11054
11068
|
} catch (exception) {
|
|
11055
11069
|
return {
|
|
11056
11070
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
11057
|
-
message: this.chargy.
|
|
11071
|
+
message: this.chargy.GetMultilanguageText("Exception occured: " + (exception instanceof Error ? exception.message : String(exception))),
|
|
11058
11072
|
certainty: 0
|
|
11059
11073
|
};
|
|
11060
11074
|
}
|
|
@@ -11379,18 +11393,18 @@ var BSMCrypt01 = class extends ACrypt {
|
|
|
11379
11393
|
tryToParseBSM_WS36aMeasurements(CTR, ExpectedEVSEId, ExpectedCscSwVersion, Measurements) {
|
|
11380
11394
|
if (!Array.isArray(Measurements)) return {
|
|
11381
11395
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
11382
|
-
message: this.chargy.
|
|
11396
|
+
message: this.chargy.GetMultilanguageText("MissingOrInvalidSignedMeterValues"),
|
|
11383
11397
|
certainty: 0
|
|
11384
11398
|
};
|
|
11385
11399
|
if (Measurements.length < 2) return {
|
|
11386
11400
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
11387
|
-
message: this.chargy.
|
|
11401
|
+
message: this.chargy.GetMultilanguageText("AtLeastTwoSignedMeterValuesRequired"),
|
|
11388
11402
|
certainty: 0
|
|
11389
11403
|
};
|
|
11390
11404
|
const firstMeasurement = Measurements[0];
|
|
11391
11405
|
if (!isMandatoryJSONObject(firstMeasurement)) return {
|
|
11392
11406
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
11393
|
-
message: this.chargy.
|
|
11407
|
+
message: this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalidSignedMeterValueP", 1),
|
|
11394
11408
|
certainty: 0
|
|
11395
11409
|
};
|
|
11396
11410
|
const errors = new Array();
|
|
@@ -11399,51 +11413,51 @@ var BSMCrypt01 = class extends ACrypt {
|
|
|
11399
11413
|
let secondaryErrors = 0;
|
|
11400
11414
|
try {
|
|
11401
11415
|
if (!isMandatoryString(firstMeasurement["@context"]))
|
|
11402
|
-
errors.push(this.chargy.
|
|
11416
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_JSONContextP", 1)));
|
|
11403
11417
|
const meterInfo = firstMeasurement["meterInfo"];
|
|
11404
11418
|
if (!isMandatoryJSONObject(meterInfo)) {
|
|
11405
|
-
errors.push(this.chargy.
|
|
11419
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfoP", 1)));
|
|
11406
11420
|
secondaryErrors += 5;
|
|
11407
11421
|
} else {
|
|
11408
11422
|
if (!isMandatoryString(meterInfo["firmwareVersion"]))
|
|
11409
|
-
errors.push(this.chargy.
|
|
11423
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_FirmwareVersionP", 1)));
|
|
11410
11424
|
if (!isMandatoryString(meterInfo["publicKey"]))
|
|
11411
|
-
errors.push(this.chargy.
|
|
11425
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_PublicKeyP", 1)));
|
|
11412
11426
|
if (!isMandatoryString(meterInfo["meterId"]))
|
|
11413
|
-
errors.push(this.chargy.
|
|
11427
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_MeterIdP", 1)));
|
|
11414
11428
|
if (!isMandatoryString(meterInfo["manufacturer"]))
|
|
11415
|
-
errors.push(this.chargy.
|
|
11429
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_ManufacturerP", 1)));
|
|
11416
11430
|
if (!isMandatoryString(meterInfo["type"]))
|
|
11417
|
-
errors.push(this.chargy.
|
|
11431
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_TypeP", 1)));
|
|
11418
11432
|
}
|
|
11419
11433
|
const contract = firstMeasurement["contract"];
|
|
11420
11434
|
if (!isMandatoryJSONObject(contract)) {
|
|
11421
|
-
errors.push(this.chargy.
|
|
11435
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_ContractP", 1)));
|
|
11422
11436
|
secondaryErrors += 2;
|
|
11423
11437
|
} else {
|
|
11424
11438
|
if (!isMandatoryString(contract["id"]))
|
|
11425
|
-
errors.push(this.chargy.
|
|
11439
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_Contract_IdP", 1)));
|
|
11426
11440
|
if (!isOptionalString(contract["type"]))
|
|
11427
|
-
errors.push(this.chargy.
|
|
11441
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_Contract_TypeP", 1)));
|
|
11428
11442
|
}
|
|
11429
11443
|
const value = firstMeasurement["value"];
|
|
11430
11444
|
if (!isMandatoryJSONObject(value)) {
|
|
11431
|
-
errors.push(this.chargy.
|
|
11445
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_ValueP", 1)));
|
|
11432
11446
|
secondaryErrors += 8;
|
|
11433
11447
|
} else {
|
|
11434
11448
|
const measurand = value["measurand"];
|
|
11435
11449
|
if (!isMandatoryJSONObject(measurand)) {
|
|
11436
|
-
errors.push(this.chargy.
|
|
11450
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeasurandP", 1)));
|
|
11437
11451
|
secondaryErrors += 2;
|
|
11438
11452
|
} else {
|
|
11439
11453
|
if (!isMandatoryString(measurand["id"]))
|
|
11440
|
-
errors.push(this.chargy.
|
|
11454
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_Measurand_IdentificationP", 1)));
|
|
11441
11455
|
if (!isMandatoryString(measurand["name"]))
|
|
11442
|
-
errors.push(this.chargy.
|
|
11456
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_Measurand_NameP", 1)));
|
|
11443
11457
|
}
|
|
11444
11458
|
const measuredValue = value["measuredValue"];
|
|
11445
11459
|
if (!isMandatoryJSONObject(measuredValue)) {
|
|
11446
|
-
errors.push(this.chargy.
|
|
11460
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeasuredValueP", 1)));
|
|
11447
11461
|
secondaryErrors += 4;
|
|
11448
11462
|
} else {
|
|
11449
11463
|
}
|
|
@@ -11521,7 +11535,7 @@ var BSMCrypt01 = class extends ACrypt {
|
|
|
11521
11535
|
if (currentMeasurement === void 0)
|
|
11522
11536
|
throw new Error(`Invalid signed meter value #${String(measurementCounter)}!`);
|
|
11523
11537
|
if (currentMeasurement["@context"] !== common.context)
|
|
11524
|
-
currentErrors.push(this.chargy.
|
|
11538
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_JSONContextP", measurementCounter)));
|
|
11525
11539
|
const currentId = currentMeasurement["@id"];
|
|
11526
11540
|
if (previousId !== "" && typeof currentId === "string") {
|
|
11527
11541
|
if (typeof previousId !== "string")
|
|
@@ -11532,7 +11546,7 @@ var BSMCrypt01 = class extends ACrypt {
|
|
|
11532
11546
|
// anything (not even NaN). This way we are checking that both counter values
|
|
11533
11547
|
// are numeric too.
|
|
11534
11548
|
parseInt(previousParts[1], 10) >= parseInt(currentParts[1], 10)) {
|
|
11535
|
-
currentErrors.push(this.chargy.
|
|
11549
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_MeasurementIdP", measurementCounter)));
|
|
11536
11550
|
}
|
|
11537
11551
|
}
|
|
11538
11552
|
previousId = currentId;
|
|
@@ -11541,11 +11555,11 @@ var BSMCrypt01 = class extends ACrypt {
|
|
|
11541
11555
|
const displayedFormatObj2 = asJSONObject(valueObj2?.["displayedFormat"]);
|
|
11542
11556
|
const currentTime = asString(currentMeasurement["time"]) ?? "";
|
|
11543
11557
|
if (previousTime !== "" && currentTime <= previousTime)
|
|
11544
|
-
currentErrors.push(this.chargy.
|
|
11558
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_TimestampP", measurementCounter)));
|
|
11545
11559
|
previousTime = currentTime;
|
|
11546
11560
|
const currentValue = asNumber(measuredValueObj2?.["value"]);
|
|
11547
11561
|
if (previousValue !== void 0 && currentValue !== void 0 && currentValue < previousValue)
|
|
11548
|
-
currentErrors.push(this.chargy.
|
|
11562
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_Measurement_ValueP", measurementCounter)));
|
|
11549
11563
|
previousValue = currentValue;
|
|
11550
11564
|
const additionalValuesRaw = currentMeasurement["additionalValues"];
|
|
11551
11565
|
if (!isMandatoryJSONArray(additionalValuesRaw))
|
|
@@ -11572,32 +11586,32 @@ var BSMCrypt01 = class extends ACrypt {
|
|
|
11572
11586
|
if (currentMeasurement["meterInfo"]) {
|
|
11573
11587
|
const meterInfoObj2 = asJSONObject(currentMeasurement["meterInfo"]);
|
|
11574
11588
|
if (meterInfoObj2?.["firmwareVersion"] !== common.meterInfo_firmwareVersion)
|
|
11575
|
-
currentErrors.push(this.chargy.
|
|
11589
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_MeterInfo_FirmwareVersionP", measurementCounter)));
|
|
11576
11590
|
if (meterInfoObj2?.["publicKey"] !== common.meterInfo_publicKey)
|
|
11577
|
-
currentErrors.push(this.chargy.
|
|
11591
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_MeterInfo_PublicKeyP", measurementCounter)));
|
|
11578
11592
|
if (meterInfoObj2?.["meterId"] !== common.meterInfo_meterId)
|
|
11579
|
-
currentErrors.push(this.chargy.
|
|
11593
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_MeterInfo_MeterIdP", measurementCounter)));
|
|
11580
11594
|
if (meterInfoObj2?.["meterId"] !== additionalValues.filter((element) => element.measurandName === "MA1")[0]?.value)
|
|
11581
|
-
currentErrors.push(this.chargy.
|
|
11595
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_MeterInfo_MeterIdP", measurementCounter)));
|
|
11582
11596
|
if (meterInfoObj2?.["manufacturer"] !== common.meterInfo_manufacturer)
|
|
11583
|
-
currentErrors.push(this.chargy.
|
|
11597
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_MeterInfo_ManufacturerP", measurementCounter)));
|
|
11584
11598
|
if (meterInfoObj2?.["type"] !== common.meterInfo_type)
|
|
11585
|
-
currentErrors.push(this.chargy.
|
|
11599
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_MeterInfo_TypeP", measurementCounter)));
|
|
11586
11600
|
}
|
|
11587
11601
|
if (currentMeasurement["contract"]) {
|
|
11588
11602
|
const contractObj2 = asJSONObject(currentMeasurement["contract"]);
|
|
11589
11603
|
if (additionalValues.filter((element) => element.measurandName?.startsWith("Meta") && asString(element.value)?.startsWith("contract-id:")).length == 0)
|
|
11590
|
-
currentErrors.push(this.chargy.
|
|
11604
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_Contract_IdP", measurementCounter)));
|
|
11591
11605
|
if (contractObj2?.["id"] !== common.contract_id)
|
|
11592
|
-
currentErrors.push(this.chargy.
|
|
11606
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_Contract_IdP", measurementCounter)));
|
|
11593
11607
|
if (contractObj2?.["type"] !== common.contract_type)
|
|
11594
|
-
currentErrors.push(this.chargy.
|
|
11608
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_Contract_TypeP", measurementCounter)));
|
|
11595
11609
|
const contractInfo = additionalValues.filter((element) => element.measurandName?.startsWith("Meta") && asString(element.value)?.startsWith("contract-id:"))[0]?.value;
|
|
11596
11610
|
if (contractInfo != null) {
|
|
11597
11611
|
if (contractObj2?.["type"] && contractInfo !== "contract-id: " + (common.contract_type ?? "-") + ":" + common.contract_id)
|
|
11598
|
-
currentErrors.push(this.chargy.
|
|
11612
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_Contract_IdP", measurementCounter)));
|
|
11599
11613
|
if (!contractObj2?.["type"] && contractInfo !== "contract-id: " + common.contract_id)
|
|
11600
|
-
currentErrors.push(this.chargy.
|
|
11614
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_Contract_IdP", measurementCounter)));
|
|
11601
11615
|
}
|
|
11602
11616
|
}
|
|
11603
11617
|
const rcrInAdditional = additionalValues.find((element) => element.measurandName == "RCR");
|
|
@@ -11608,39 +11622,39 @@ var BSMCrypt01 = class extends ACrypt {
|
|
|
11608
11622
|
if (valueObj2?.["measurand"]) {
|
|
11609
11623
|
const measurandObj2 = asJSONObject(valueObj2["measurand"]);
|
|
11610
11624
|
if (measurandObj2?.["id"] !== common.value_measurand_id || measurandObj2["id"] !== rcrInAdditional?.measurandId)
|
|
11611
|
-
currentErrors.push(this.chargy.
|
|
11625
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_Measurand_IdentificationP", measurementCounter)));
|
|
11612
11626
|
if (measurandObj2?.["name"] !== common.value_measurand_name || measurandObj2["name"] !== rcrInAdditional?.measurandName)
|
|
11613
|
-
currentErrors.push(this.chargy.
|
|
11627
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_Measurand_NameP", measurementCounter)));
|
|
11614
11628
|
}
|
|
11615
11629
|
if (valueObj2?.["measuredValue"]) {
|
|
11616
11630
|
if (measuredValueObj2?.["value"] !== rcrInAdditional?.value)
|
|
11617
|
-
currentErrors.push(this.chargy.
|
|
11631
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValueP", measurementCounter)));
|
|
11618
11632
|
if (measuredValueObj2?.["scale"] !== common.value_measuredValue_scale || measuredValueObj2?.["scale"] !== rcrInAdditional?.scale)
|
|
11619
|
-
currentErrors.push(this.chargy.
|
|
11633
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_ScaleP", measurementCounter)));
|
|
11620
11634
|
if (measuredValueObj2?.["unit"] !== common.value_measuredValue_unit || measuredValueObj2["unit"] !== rcrInAdditional?.unit)
|
|
11621
|
-
currentErrors.push(this.chargy.
|
|
11635
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_UnitP", measurementCounter)));
|
|
11622
11636
|
if (measuredValueObj2?.["unitEncoded"] !== common.value_measuredValue_unitEncoded || measuredValueObj2?.["unitEncoded"] !== rcrInAdditional?.unitEncoded)
|
|
11623
|
-
currentErrors.push(this.chargy.
|
|
11637
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_UnitEncodedP", measurementCounter)));
|
|
11624
11638
|
if (measuredValueObj2?.["valueType"] !== common.value_measuredValue_valueType || measuredValueObj2?.["valueType"] !== rcrInAdditional?.valueType)
|
|
11625
|
-
currentErrors.push(this.chargy.
|
|
11639
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_TypeP", measurementCounter)));
|
|
11626
11640
|
}
|
|
11627
11641
|
if (currentMeasurement["chargePoint"] && asJSONObject(currentMeasurement["chargePoint"])?.["softwareVersion"] !== common.chargePoint_softwareVersion)
|
|
11628
|
-
currentErrors.push(this.chargy.
|
|
11642
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageText("Inconsistent_ChargingStation_FirmwareVersion")));
|
|
11629
11643
|
const signedEVSEId = additionalValues.filter((element) => element.measurandName?.startsWith("Meta") && asString(element.value)?.startsWith("evse-id:"));
|
|
11630
11644
|
if (signedEVSEId.length == 1) {
|
|
11631
11645
|
const evse__id = (asString(signedEVSEId[0]?.value) ?? "").replace("evse-id:", "").trim();
|
|
11632
11646
|
if (evse__id !== "unknown" && ExpectedEVSEId !== evse__id)
|
|
11633
|
-
currentErrors.push(this.chargy.
|
|
11647
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageText("Inconsistent_EVSE_Identification")));
|
|
11634
11648
|
}
|
|
11635
11649
|
const signedCSCSWVersion = additionalValues.filter((element) => element.measurandName?.startsWith("Meta") && asString(element.value)?.startsWith("csc-sw-version:"));
|
|
11636
11650
|
if (signedCSCSWVersion.length == 1) {
|
|
11637
11651
|
const csc_sw_version = asString(signedCSCSWVersion[0]?.value)?.replace("csc-sw-version:", "").trim() ?? null;
|
|
11638
11652
|
if (previousCscSwVersion !== null && previousCscSwVersion !== csc_sw_version)
|
|
11639
|
-
currentErrors.push(this.chargy.
|
|
11653
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageText("Inconsistent_ChargingStation_FirmwareVersion")));
|
|
11640
11654
|
if (ExpectedCscSwVersion !== null && ExpectedCscSwVersion !== csc_sw_version)
|
|
11641
11655
|
currentWarnings.push({
|
|
11642
11656
|
level: "medium" /* medium */,
|
|
11643
|
-
message: this.chargy.
|
|
11657
|
+
message: this.chargy.GetMultilanguageText("Inconsistent_ChargingStation_FirmwareVersion")
|
|
11644
11658
|
});
|
|
11645
11659
|
previousCscSwVersion = csc_sw_version;
|
|
11646
11660
|
}
|
|
@@ -11701,32 +11715,32 @@ var BSMCrypt01 = class extends ACrypt {
|
|
|
11701
11715
|
}
|
|
11702
11716
|
const currentRCRValue = asNumber(RCR?.value) ?? NaN;
|
|
11703
11717
|
if (previousRCR !== -1 && currentRCRValue < previousRCR)
|
|
11704
|
-
currentErrors.push(this.chargy.
|
|
11718
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_Measurement_ValueP", measurementCounter)));
|
|
11705
11719
|
previousRCR = currentRCRValue;
|
|
11706
11720
|
if (RCnt !== currentMeasurement["measurementId"])
|
|
11707
|
-
currentErrors.push(this.chargy.
|
|
11721
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_MeasurementIdP", measurementCounter)));
|
|
11708
11722
|
if (previousRCnt !== -1 && RCnt != previousRCnt + 1)
|
|
11709
|
-
currentErrors.push(this.chargy.
|
|
11723
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_CounterP", measurementCounter)));
|
|
11710
11724
|
previousRCnt = RCnt;
|
|
11711
11725
|
if (previousOS !== -1 && OS <= previousOS)
|
|
11712
|
-
currentErrors.push(this.chargy.
|
|
11726
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_OperationSecondsCounterP", measurementCounter)));
|
|
11713
11727
|
previousOS = OS;
|
|
11714
11728
|
if (previousEpoch !== -1 && Epoch <= previousEpoch)
|
|
11715
|
-
currentErrors.push(this.chargy.
|
|
11729
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_UNIXEpochP", measurementCounter)));
|
|
11716
11730
|
previousEpoch = Epoch;
|
|
11717
11731
|
const measurementTimestamp1 = new Date(Epoch * 1e3 + TZO * 6e4).toISOString();
|
|
11718
11732
|
const measurementTimestamp2 = measurementTimestamp1.substring(0, measurementTimestamp1.indexOf("."));
|
|
11719
11733
|
const measurementTimestamp3 = measurementTimestamp2 + (TZO > 0 ? "+" : "-") + (Math.abs(TZO) / 60).toString().padStart(2, "0") + ":" + (Math.abs(TZO) % 60).toString().padStart(2, "0");
|
|
11720
11734
|
if (currentTime !== measurementTimestamp3)
|
|
11721
|
-
currentErrors.push(this.chargy.
|
|
11735
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_TimestampP", measurementCounter)));
|
|
11722
11736
|
if (common.MA1 !== null && MA1 !== common.MA1)
|
|
11723
|
-
currentErrors.push(this.chargy.
|
|
11737
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_MeterInfo_MeterIdP", measurementCounter)));
|
|
11724
11738
|
common.MA1 = MA1;
|
|
11725
11739
|
if (common.epochSetCnt !== -1 && EpochSetCnt !== common.epochSetCnt)
|
|
11726
|
-
currentErrors.push(this.chargy.
|
|
11740
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_EpochSet_CounterP", measurementCounter)));
|
|
11727
11741
|
common.epochSetCnt = EpochSetCnt;
|
|
11728
11742
|
if (common.epochSetOS !== -1 && EpochSetOS !== common.epochSetOS)
|
|
11729
|
-
currentErrors.push(this.chargy.
|
|
11743
|
+
currentErrors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_SignedMeterValue_EpochSet_OperationSecondsP", measurementCounter)));
|
|
11730
11744
|
common.epochSetOS = EpochSetOS;
|
|
11731
11745
|
common.dataSets.push({
|
|
11732
11746
|
Typ,
|
|
@@ -11765,7 +11779,7 @@ var BSMCrypt01 = class extends ACrypt {
|
|
|
11765
11779
|
throw new Error(this.chargy.GetLocalizedMessageWithParameter("Inconsistent_EnergyMeterValueP", 1));
|
|
11766
11780
|
for (let i = 1; i < common.dataSets.length - 1; i++) {
|
|
11767
11781
|
if (common.dataSets[i]?.TypParsed !== "CURRENT")
|
|
11768
|
-
errors.push(this.chargy.
|
|
11782
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Inconsistent_EnergyMeterValueP", measurementCounter + 1)));
|
|
11769
11783
|
}
|
|
11770
11784
|
if (lastDataSet === void 0 || lastDataSet.TypParsed !== "END" && lastDataSet.TypParsed !== "TURN OFF")
|
|
11771
11785
|
throw new Error(this.chargy.GetLocalizedMessageWithParameter("Inconsistent_EnergyMeterValueP", n + 1));
|
|
@@ -11835,7 +11849,11 @@ var BSMCrypt01 = class extends ACrypt {
|
|
|
11835
11849
|
try {
|
|
11836
11850
|
ASN1Signature = ASN1_SignatureSchema.decode(Buffer.from(dataSet.signature, "hex"), "der");
|
|
11837
11851
|
} catch (exception) {
|
|
11838
|
-
|
|
11852
|
+
const signatureError = this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_SignatureP", 1);
|
|
11853
|
+
const exceptionText = ": " + (exception instanceof Error ? exception.message : String(exception));
|
|
11854
|
+
for (const language of Object.keys(signatureError))
|
|
11855
|
+
signatureError[language] = (signatureError[language] ?? "") + exceptionText;
|
|
11856
|
+
errors.push(CreateError(signatureError));
|
|
11839
11857
|
}
|
|
11840
11858
|
const bsmMeasurementValue = {
|
|
11841
11859
|
timestamp: dataSet.time,
|
|
@@ -11928,7 +11946,9 @@ var BSMCrypt01 = class extends ACrypt {
|
|
|
11928
11946
|
CTR.certainty = 1 - errors.length / numberOfFormatChecks;
|
|
11929
11947
|
return CTR;
|
|
11930
11948
|
} catch (exception) {
|
|
11931
|
-
errors.push(
|
|
11949
|
+
errors.push(
|
|
11950
|
+
CreateError({ "en": "Exception occured: " + (exception instanceof Error ? exception.message : String(exception)) })
|
|
11951
|
+
);
|
|
11932
11952
|
}
|
|
11933
11953
|
return {
|
|
11934
11954
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
@@ -13053,14 +13073,14 @@ var Mennekes = class {
|
|
|
13053
13073
|
if (chargingProcesses.length === 0)
|
|
13054
13074
|
return {
|
|
13055
13075
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
13056
|
-
message: this.chargy.
|
|
13076
|
+
message: this.chargy.GetMultilanguageText("UnknownOrInvalidChargingSessionFormat"),
|
|
13057
13077
|
certainty: 0
|
|
13058
13078
|
};
|
|
13059
13079
|
return await Promise.resolve(this.toChargeTransparencyRecord(chargingProcesses));
|
|
13060
13080
|
} catch (exception) {
|
|
13061
13081
|
return {
|
|
13062
13082
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
13063
|
-
message: "Exception occured: " + (exception instanceof Error ? exception.message : String(exception)),
|
|
13083
|
+
message: this.chargy.GetMultilanguageText("Exception occured: " + (exception instanceof Error ? exception.message : String(exception))),
|
|
13064
13084
|
certainty: 0
|
|
13065
13085
|
};
|
|
13066
13086
|
}
|
|
@@ -13197,7 +13217,10 @@ var MennekesCrypt01 = class extends ACrypt {
|
|
|
13197
13217
|
sessionResult = "InvalidSignature" /* InvalidSignature */;
|
|
13198
13218
|
}
|
|
13199
13219
|
if (sessionResult === "ValidSignature" /* ValidSignature */) {
|
|
13200
|
-
const lawErrors = validateMennekesLawConformity(
|
|
13220
|
+
const lawErrors = validateMennekesLawConformity(
|
|
13221
|
+
measurement.values,
|
|
13222
|
+
this.chargy
|
|
13223
|
+
);
|
|
13201
13224
|
if (lawErrors.length > 0) {
|
|
13202
13225
|
measurement.verificationResult = {
|
|
13203
13226
|
status: "InvalidMeasurement" /* InvalidMeasurement */,
|
|
@@ -13454,18 +13477,20 @@ function toMennekesMeasurementValue(measurement) {
|
|
|
13454
13477
|
"measurement": void 0
|
|
13455
13478
|
};
|
|
13456
13479
|
}
|
|
13457
|
-
function validateMennekesLawConformity(measurementValues) {
|
|
13480
|
+
function validateMennekesLawConformity(measurementValues, chargy) {
|
|
13458
13481
|
const errors = new Array();
|
|
13459
13482
|
const start = measurementValues[0];
|
|
13460
13483
|
const end = measurementValues[measurementValues.length - 1];
|
|
13461
13484
|
if (start == null || end == null)
|
|
13462
|
-
return [
|
|
13485
|
+
return [
|
|
13486
|
+
CreateError(chargy.GetMultilanguageText("Mennekes EDL40 requires at least two measurement values."))
|
|
13487
|
+
];
|
|
13463
13488
|
if (start.eventCounter !== end.eventCounter)
|
|
13464
|
-
errors.push("Event counter mismatch.");
|
|
13489
|
+
errors.push(CreateError(chargy.GetMultilanguageText("Event counter mismatch.")));
|
|
13465
13490
|
if (Number(start.paginationId) >= Number(end.paginationId))
|
|
13466
|
-
errors.push("Pagination must increase from start to end.");
|
|
13491
|
+
errors.push(CreateError(chargy.GetMultilanguageText("Pagination must increase from start to end.")));
|
|
13467
13492
|
if (start.value.gt(end.value))
|
|
13468
|
-
errors.push("Meter value must not decrease.");
|
|
13493
|
+
errors.push(CreateError(chargy.GetMultilanguageText("Meter value must not decrease.")));
|
|
13469
13494
|
return errors;
|
|
13470
13495
|
}
|
|
13471
13496
|
function child(parent, localName) {
|
|
@@ -13840,17 +13865,17 @@ var OCMF = class {
|
|
|
13840
13865
|
const pagination = paging.length > 1 ? parseNumber(paging.substring(1)) : null;
|
|
13841
13866
|
if (transactionType === "undefined" /* undefined */) return {
|
|
13842
13867
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
13843
|
-
message: this.chargy.
|
|
13868
|
+
message: this.chargy.GetMultilanguageText("The given OCMF data does not have a valid transaction type!"),
|
|
13844
13869
|
certainty: 0
|
|
13845
13870
|
};
|
|
13846
13871
|
if (!isMandatoryNumber(pagination)) return {
|
|
13847
13872
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
13848
|
-
message: this.chargy.
|
|
13873
|
+
message: this.chargy.GetMultilanguageText("The given OCMF data does not have a valid pagination counter!"),
|
|
13849
13874
|
certainty: 0
|
|
13850
13875
|
};
|
|
13851
13876
|
if (firstOCMDJSONDocument.payload.RD.length == 0) return {
|
|
13852
13877
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
13853
|
-
message: this.chargy.
|
|
13878
|
+
message: this.chargy.GetMultilanguageText("Each OCMF data set must have at least one meter reading!"),
|
|
13854
13879
|
certainty: 0
|
|
13855
13880
|
};
|
|
13856
13881
|
const CTR = {
|
|
@@ -13948,14 +13973,14 @@ var OCMF = class {
|
|
|
13948
13973
|
const timeSplit = time.split(" ");
|
|
13949
13974
|
if (timeSplit.length != 2) return {
|
|
13950
13975
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
13951
|
-
message: this.chargy.
|
|
13976
|
+
message: this.chargy.GetMultilanguageText("The given OCMF meter value does not have a valid time format!"),
|
|
13952
13977
|
certainty: 0
|
|
13953
13978
|
};
|
|
13954
13979
|
const timeRegEx = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2},\d{3}[+-]\d{4}$/;
|
|
13955
13980
|
const timeStamp = timeSplit[0];
|
|
13956
13981
|
if (!isMandatoryString(timeStamp) || !timeRegEx.test(timeStamp)) return {
|
|
13957
13982
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
13958
|
-
message: this.chargy.
|
|
13983
|
+
message: this.chargy.GetMultilanguageText("The given OCMF meter value does not have a valid time sync format!"),
|
|
13959
13984
|
certainty: 0
|
|
13960
13985
|
};
|
|
13961
13986
|
const timeStampISO8601 = this.convertToISO8601(timeStamp);
|
|
@@ -13963,7 +13988,7 @@ var OCMF = class {
|
|
|
13963
13988
|
let timeSync = "unknown" /* unknown */;
|
|
13964
13989
|
if (!isMandatoryString(timeSyncText) || !["U", "I", "S", "R"].includes(timeSyncText)) return {
|
|
13965
13990
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
13966
|
-
message: this.chargy.
|
|
13991
|
+
message: this.chargy.GetMultilanguageText("The given OCMF meter value does not have a valid time sync format!"),
|
|
13967
13992
|
certainty: 0
|
|
13968
13993
|
};
|
|
13969
13994
|
switch (timeSyncText) {
|
|
@@ -13982,23 +14007,23 @@ var OCMF = class {
|
|
|
13982
14007
|
default:
|
|
13983
14008
|
return {
|
|
13984
14009
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
13985
|
-
message: this.chargy.
|
|
14010
|
+
message: this.chargy.GetMultilanguageText("The given OCMF meter value does not have a valid time sync format!"),
|
|
13986
14011
|
certainty: 0
|
|
13987
14012
|
};
|
|
13988
14013
|
}
|
|
13989
14014
|
if (transaction && !["B", "C", "X", "E", "L", "R", "A", "P", "S", "T"].includes(transaction)) return {
|
|
13990
14015
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
13991
|
-
message: this.chargy.
|
|
14016
|
+
message: this.chargy.GetMultilanguageText("The given OCMF meter value does not have a valid transaction type!"),
|
|
13992
14017
|
certainty: 0
|
|
13993
14018
|
};
|
|
13994
14019
|
if (!["kWh", "Wh", "mOhm", "uOhm"].includes(readingUnit)) return {
|
|
13995
14020
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
13996
|
-
message: this.chargy.
|
|
14021
|
+
message: this.chargy.GetMultilanguageText("The given OCMF meter value does not have a valid current type!"),
|
|
13997
14022
|
certainty: 0
|
|
13998
14023
|
};
|
|
13999
14024
|
if (readingCurrentType && !["AC", "DC"].includes(readingCurrentType)) return {
|
|
14000
14025
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
14001
|
-
message: this.chargy.
|
|
14026
|
+
message: this.chargy.GetMultilanguageText("The given OCMF meter value does not have a valid current type!"),
|
|
14002
14027
|
certainty: 0
|
|
14003
14028
|
};
|
|
14004
14029
|
if (CTR.chargingSessions?.[0]?.begin === "?")
|
|
@@ -14067,7 +14092,7 @@ var OCMF = class {
|
|
|
14067
14092
|
} catch (exception) {
|
|
14068
14093
|
return {
|
|
14069
14094
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
14070
|
-
message: "Invalid OCMF data: " + (exception instanceof Error ? exception.message : String(exception)),
|
|
14095
|
+
message: this.chargy.GetMultilanguageText("Invalid OCMF data: " + (exception instanceof Error ? exception.message : String(exception))),
|
|
14071
14096
|
certainty: 0
|
|
14072
14097
|
};
|
|
14073
14098
|
}
|
|
@@ -14502,7 +14527,7 @@ var OCMF = class {
|
|
|
14502
14527
|
async TryToParseOCMFDocuments(OCMFDocuments, PublicKey, PublicKeyEncoding, ContainerInfos) {
|
|
14503
14528
|
if (OCMFDocuments.length == 0) return {
|
|
14504
14529
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
14505
|
-
message: this.chargy.GetLocalizedMessage("The given OCMF data could not be parsed") + "!",
|
|
14530
|
+
message: this.chargy.GetMultilanguageText(this.chargy.GetLocalizedMessage("The given OCMF data could not be parsed") + "!"),
|
|
14506
14531
|
certainty: 0
|
|
14507
14532
|
};
|
|
14508
14533
|
const ocmfJSONDocumentGroups = /* @__PURE__ */ new Map();
|
|
@@ -14522,7 +14547,7 @@ var OCMF = class {
|
|
|
14522
14547
|
} catch (exception) {
|
|
14523
14548
|
return {
|
|
14524
14549
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
14525
|
-
message: this.chargy.GetLocalizedMessage("The given OCMF data could not be parsed") + ": " + (exception instanceof Error ? exception.message : String(exception)),
|
|
14550
|
+
message: this.chargy.GetMultilanguageText(this.chargy.GetLocalizedMessage("The given OCMF data could not be parsed") + ": " + (exception instanceof Error ? exception.message : String(exception))),
|
|
14526
14551
|
certainty: 0
|
|
14527
14552
|
};
|
|
14528
14553
|
}
|
|
@@ -14550,7 +14575,7 @@ var OCMF = class {
|
|
|
14550
14575
|
default:
|
|
14551
14576
|
ocmfCTRs.push({
|
|
14552
14577
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
14553
|
-
message: this.chargy.
|
|
14578
|
+
message: this.chargy.GetMultilanguageText("Unknown OCMF version!"),
|
|
14554
14579
|
certainty: 0
|
|
14555
14580
|
});
|
|
14556
14581
|
break;
|
|
@@ -14562,7 +14587,7 @@ var OCMF = class {
|
|
|
14562
14587
|
}
|
|
14563
14588
|
return {
|
|
14564
14589
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
14565
|
-
message: this.chargy.GetLocalizedMessage("The given OCMF data could not be parsed") + (typeof ocmfJSONDocuments === "string" ? ": " + ocmfJSONDocuments : "!"),
|
|
14590
|
+
message: this.chargy.GetMultilanguageText(this.chargy.GetLocalizedMessage("The given OCMF data could not be parsed") + (typeof ocmfJSONDocuments === "string" ? ": " + ocmfJSONDocuments : "!")),
|
|
14566
14591
|
certainty: 0
|
|
14567
14592
|
};
|
|
14568
14593
|
}
|
|
@@ -14605,11 +14630,11 @@ var OCPI = class {
|
|
|
14605
14630
|
const public_key = SomeJSON["public_key"];
|
|
14606
14631
|
const signed_values = SomeJSON["signed_values"];
|
|
14607
14632
|
if (!isMandatoryString(encoding_method))
|
|
14608
|
-
errors.push(this.chargy.
|
|
14633
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidEncodingMethod")));
|
|
14609
14634
|
if (!isMandatoryString(public_key))
|
|
14610
|
-
errors.push(this.chargy.
|
|
14635
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidPublicKey")));
|
|
14611
14636
|
if (!isMandatoryJSONArray(signed_values))
|
|
14612
|
-
errors.push(this.chargy.
|
|
14637
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidSignedValues")));
|
|
14613
14638
|
if (errors.length > 0)
|
|
14614
14639
|
return {
|
|
14615
14640
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
@@ -14711,138 +14736,138 @@ var OCPI = class {
|
|
|
14711
14736
|
const chargingCostsInfo_flat_cost = chargingCostsInfo_flat?.["cost"];
|
|
14712
14737
|
const signedMeterValues = SomeJSON["signedMeterValues"];
|
|
14713
14738
|
if (!isMandatoryString(chargingSessionId))
|
|
14714
|
-
errors.push(this.chargy.
|
|
14739
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid charge transparency record identification!")));
|
|
14715
14740
|
if (!isMandatoryJSONObject(chargePointInfo)) {
|
|
14716
|
-
errors.push(this.chargy.
|
|
14741
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidChargePointInfo")));
|
|
14717
14742
|
secondaryErrors += 19;
|
|
14718
14743
|
} else {
|
|
14719
14744
|
if (!isMandatoryString(evseId))
|
|
14720
|
-
errors.push(this.chargy.
|
|
14745
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidEVSEIdentification")));
|
|
14721
14746
|
if (!isMandatoryJSONObject(placeInfo)) {
|
|
14722
|
-
errors.push(this.chargy.
|
|
14747
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidPlaceInfo")));
|
|
14723
14748
|
secondaryErrors += 8;
|
|
14724
14749
|
} else {
|
|
14725
14750
|
if (!isMandatoryJSONObject(geoLocation)) {
|
|
14726
|
-
errors.push(this.chargy.
|
|
14751
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidGeoLocation")));
|
|
14727
14752
|
secondaryErrors += 2;
|
|
14728
14753
|
} else {
|
|
14729
14754
|
if (!isMandatoryNumber(geoLocation_lat))
|
|
14730
|
-
errors.push(this.chargy.
|
|
14755
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidGeoLocationLatitude")));
|
|
14731
14756
|
if (!isMandatoryNumber(geoLocation_lon))
|
|
14732
|
-
errors.push(this.chargy.
|
|
14757
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidGeoLocationLongitude")));
|
|
14733
14758
|
}
|
|
14734
14759
|
if (!isMandatoryJSONObject(address)) {
|
|
14735
|
-
errors.push(this.chargy.
|
|
14760
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidAddress")));
|
|
14736
14761
|
secondaryErrors += 4;
|
|
14737
14762
|
} else {
|
|
14738
14763
|
if (!isMandatoryString(address_street))
|
|
14739
|
-
errors.push(this.chargy.
|
|
14764
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidAddressStreetName")));
|
|
14740
14765
|
if (!isMandatoryString(address_zipCode))
|
|
14741
|
-
errors.push(this.chargy.
|
|
14766
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidAddressZIPCode")));
|
|
14742
14767
|
if (!isMandatoryString(address_town))
|
|
14743
|
-
errors.push(this.chargy.
|
|
14768
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidAddressCityName")));
|
|
14744
14769
|
if (!isMandatoryString(address_country))
|
|
14745
|
-
errors.push(this.chargy.
|
|
14770
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidAddressCountryName")));
|
|
14746
14771
|
}
|
|
14747
14772
|
}
|
|
14748
14773
|
}
|
|
14749
14774
|
if (!isMandatoryJSONObject(chargingStationInfo)) {
|
|
14750
|
-
errors.push(this.chargy.
|
|
14775
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidChargingStationInfo")));
|
|
14751
14776
|
secondaryErrors += 5;
|
|
14752
14777
|
} else {
|
|
14753
14778
|
if (!isOptionalString(chargingStation_manufacturer))
|
|
14754
|
-
errors.push(this.chargy.
|
|
14779
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station manufacturer!")));
|
|
14755
14780
|
if (!isOptionalString(chargingStation_type))
|
|
14756
|
-
errors.push(this.chargy.
|
|
14781
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station type!")));
|
|
14757
14782
|
if (!isOptionalString(chargingStation_serialNumber))
|
|
14758
|
-
errors.push(this.chargy.
|
|
14783
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station serial number!")));
|
|
14759
14784
|
if (!isOptionalString(chargingStation_controllerSoftwareVersion))
|
|
14760
|
-
errors.push(this.chargy.
|
|
14785
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station controller software version!")));
|
|
14761
14786
|
if (!isOptionalString(chargingStation_compliance))
|
|
14762
|
-
errors.push(this.chargy.
|
|
14787
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station compliance!")));
|
|
14763
14788
|
if (!isOptionalURL(chargingStation_complianceURL))
|
|
14764
|
-
errors.push(this.chargy.
|
|
14789
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station compliance URL!")));
|
|
14765
14790
|
if (!isOptionalString(chargingStation_conformity))
|
|
14766
|
-
errors.push(this.chargy.
|
|
14791
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station conformity!")));
|
|
14767
14792
|
if (!isOptionalURL(chargingStation_conformity_URL))
|
|
14768
|
-
errors.push(this.chargy.
|
|
14793
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station conformity URL!")));
|
|
14769
14794
|
if (!isOptionalURL(chargingStation_conformity_certificateId))
|
|
14770
|
-
errors.push(this.chargy.
|
|
14795
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station conformity certificate identification!")));
|
|
14771
14796
|
if (!isOptionalString(chargingStation_calibration))
|
|
14772
|
-
errors.push(this.chargy.
|
|
14797
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station calibration!")));
|
|
14773
14798
|
if (!isOptionalURL(chargingStation_calibration_URL))
|
|
14774
|
-
errors.push(this.chargy.
|
|
14799
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station calibration URL!")));
|
|
14775
14800
|
if (!isOptionalURL(chargingStation_calibration_certificateId))
|
|
14776
|
-
errors.push(this.chargy.
|
|
14801
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station calibration certificate identification!")));
|
|
14777
14802
|
}
|
|
14778
14803
|
if (meterInfo) {
|
|
14779
14804
|
if (!isOptionalString(meterInfo_meterId))
|
|
14780
|
-
errors.push(this.chargy.
|
|
14805
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_MeterIdP", 1)));
|
|
14781
14806
|
if (!isOptionalString(meterInfo_manufacturer))
|
|
14782
|
-
errors.push(this.chargy.
|
|
14807
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_ManufacturerP", 1)));
|
|
14783
14808
|
if (!isOptionalString(meterInfo_manufacturerURL))
|
|
14784
|
-
errors.push(this.chargy.
|
|
14809
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_ManufacturerP", 1)));
|
|
14785
14810
|
if (!isOptionalString(meterInfo_model))
|
|
14786
|
-
errors.push(this.chargy.
|
|
14811
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_ManufacturerP", 1)));
|
|
14787
14812
|
if (!isOptionalString(meterInfo_modelURL))
|
|
14788
|
-
errors.push(this.chargy.
|
|
14813
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_ManufacturerP", 1)));
|
|
14789
14814
|
if (!isOptionalString(meterInfo_firmwareVersion))
|
|
14790
|
-
errors.push(this.chargy.
|
|
14815
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_FirmwareVersionP", 1)));
|
|
14791
14816
|
if (!isOptionalString(meterInfo_hardwareVersion))
|
|
14792
|
-
errors.push(this.chargy.
|
|
14817
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_FirmwareVersionP", 1)));
|
|
14793
14818
|
if (!isOptionalString(meterInfo_publicKey))
|
|
14794
|
-
errors.push(this.chargy.
|
|
14819
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_PublicKeyP", 1)));
|
|
14795
14820
|
if (!isOptionalString(meterInfo_publicKeyFormat))
|
|
14796
|
-
errors.push(this.chargy.
|
|
14821
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_PublicKeyP", 1)));
|
|
14797
14822
|
if (!isOptionalString(meterInfo_publicKeyEncoding))
|
|
14798
|
-
errors.push(this.chargy.
|
|
14823
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_PublicKeyP", 1)));
|
|
14799
14824
|
if (!isOptionalString(meterInfo_signatureFormat))
|
|
14800
|
-
errors.push(this.chargy.
|
|
14825
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_PublicKeyP", 1)));
|
|
14801
14826
|
if (!isOptionalString(meterInfo_signatureEncoding))
|
|
14802
|
-
errors.push(this.chargy.
|
|
14827
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_PublicKeyP", 1)));
|
|
14803
14828
|
}
|
|
14804
14829
|
if (connectorInfo) {
|
|
14805
14830
|
if (!isOptionalString(connectorInfo_type))
|
|
14806
|
-
errors.push(this.chargy.
|
|
14831
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_MeterIdP", 1)));
|
|
14807
14832
|
if (!isOptionalString(connectorInfo_losses))
|
|
14808
|
-
errors.push(this.chargy.
|
|
14833
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_MeterIdP", 1)));
|
|
14809
14834
|
}
|
|
14810
14835
|
if (chargingCostsInfo) {
|
|
14811
14836
|
if (!isMandatoryNumber(chargingCostsInfo_total))
|
|
14812
|
-
errors.push(this.chargy.
|
|
14837
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid total costs within the charging costs!")));
|
|
14813
14838
|
if (!isMandatoryString(chargingCostsInfo_currency))
|
|
14814
|
-
errors.push(this.chargy.
|
|
14839
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid currency within the charging costs!")));
|
|
14815
14840
|
if (chargingCostsInfo_reservation) {
|
|
14816
14841
|
if (!isMandatoryNumber(chargingCostsInfo_reservation_cost))
|
|
14817
|
-
errors.push(this.chargy.
|
|
14842
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid reservation cost within the charging costs!")));
|
|
14818
14843
|
if (!isMandatoryString(chargingCostsInfo_reservation_unit))
|
|
14819
|
-
errors.push(this.chargy.
|
|
14844
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid reservation unit within the charging costs!")));
|
|
14820
14845
|
}
|
|
14821
14846
|
if (chargingCostsInfo_energy) {
|
|
14822
14847
|
if (!isMandatoryNumber(chargingCostsInfo_energy_cost))
|
|
14823
|
-
errors.push(this.chargy.
|
|
14848
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid energy cost within the charging costs!")));
|
|
14824
14849
|
if (!isMandatoryString(chargingCostsInfo_energy_unit))
|
|
14825
|
-
errors.push(this.chargy.
|
|
14850
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid energy unit within the charging costs!")));
|
|
14826
14851
|
}
|
|
14827
14852
|
if (chargingCostsInfo_time) {
|
|
14828
14853
|
if (!isMandatoryNumber(chargingCostsInfo_time_cost))
|
|
14829
|
-
errors.push(this.chargy.
|
|
14854
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid time cost within the charging costs!")));
|
|
14830
14855
|
if (!isMandatoryString(chargingCostsInfo_time_unit))
|
|
14831
|
-
errors.push(this.chargy.
|
|
14856
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid time unit within the charging costs!")));
|
|
14832
14857
|
}
|
|
14833
14858
|
if (chargingCostsInfo_idle) {
|
|
14834
14859
|
if (!isMandatoryNumber(chargingCostsInfo_idle_cost))
|
|
14835
|
-
errors.push(this.chargy.
|
|
14860
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid idle cost within the charging costs!")));
|
|
14836
14861
|
if (!isMandatoryString(chargingCostsInfo_idle_unit))
|
|
14837
|
-
errors.push(this.chargy.
|
|
14862
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid idle unit within the charging costs!")));
|
|
14838
14863
|
}
|
|
14839
14864
|
if (chargingCostsInfo_flat) {
|
|
14840
14865
|
if (!isMandatoryNumber(chargingCostsInfo_flat_cost))
|
|
14841
|
-
errors.push(this.chargy.
|
|
14866
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid flat cost within the charging costs!")));
|
|
14842
14867
|
}
|
|
14843
14868
|
}
|
|
14844
14869
|
if (!isMandatoryJSONArray(signedMeterValues) || signedMeterValues.length < 2) {
|
|
14845
|
-
errors.push(this.chargy.
|
|
14870
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidSignedMeterValues")));
|
|
14846
14871
|
secondaryErrors += 2 * 39;
|
|
14847
14872
|
} else {
|
|
14848
14873
|
const firstSMV = asJSONObject(signedMeterValues[0]);
|
|
@@ -14852,7 +14877,7 @@ var OCPI = class {
|
|
|
14852
14877
|
const context = asString(currentSMV?.["@context"])?.trim() ?? asString(currentSMV?.["format"])?.trim() ?? null;
|
|
14853
14878
|
if (smvContext !== context) return {
|
|
14854
14879
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
14855
|
-
message: "Inconsistent signed meter value format!",
|
|
14880
|
+
message: this.chargy.GetMultilanguageText("Inconsistent signed meter value format!"),
|
|
14856
14881
|
certainty: 1
|
|
14857
14882
|
};
|
|
14858
14883
|
}
|
|
@@ -14997,7 +15022,7 @@ var OCPI = class {
|
|
|
14997
15022
|
} catch (exception) {
|
|
14998
15023
|
return {
|
|
14999
15024
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15000
|
-
message: "Exception occured: " + (exception instanceof Error ? exception.message : String(exception)),
|
|
15025
|
+
message: this.chargy.GetMultilanguageText("Exception occured: " + (exception instanceof Error ? exception.message : String(exception))),
|
|
15001
15026
|
errors,
|
|
15002
15027
|
warnings,
|
|
15003
15028
|
certainty: (numberOfFormatChecks - errors.length - secondaryErrors) / numberOfFormatChecks
|
|
@@ -15006,7 +15031,7 @@ var OCPI = class {
|
|
|
15006
15031
|
}
|
|
15007
15032
|
return {
|
|
15008
15033
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15009
|
-
message: "No chargeIT charge transparency record",
|
|
15034
|
+
message: this.chargy.GetMultilanguageText("No chargeIT charge transparency record"),
|
|
15010
15035
|
errors,
|
|
15011
15036
|
warnings,
|
|
15012
15037
|
certainty: 0
|
|
@@ -15292,7 +15317,7 @@ var PCDF = class {
|
|
|
15292
15317
|
if (externalPublicKey != null && normalizePCDFPublicKeyHex(externalPublicKey) !== publicKey) {
|
|
15293
15318
|
return {
|
|
15294
15319
|
status: "InvalidPublicKey" /* InvalidPublicKey */,
|
|
15295
|
-
message: "Wrong Public Key",
|
|
15320
|
+
message: this.chargy.GetMultilanguageText("Wrong Public Key"),
|
|
15296
15321
|
certainty: 1
|
|
15297
15322
|
};
|
|
15298
15323
|
}
|
|
@@ -15313,7 +15338,7 @@ var PCDF = class {
|
|
|
15313
15338
|
} catch (exception) {
|
|
15314
15339
|
return {
|
|
15315
15340
|
status: exception instanceof PCDFParseError ? "InvalidSessionFormat" /* InvalidSessionFormat */ : "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15316
|
-
message: exception instanceof Error ? exception.message : String(exception),
|
|
15341
|
+
message: this.chargy.GetMultilanguageText(exception instanceof Error ? exception.message : String(exception)),
|
|
15317
15342
|
certainty: 0
|
|
15318
15343
|
};
|
|
15319
15344
|
}
|
|
@@ -15619,7 +15644,7 @@ var SAFEXML = class _SAFEXML {
|
|
|
15619
15644
|
if (signedData == null)
|
|
15620
15645
|
return {
|
|
15621
15646
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15622
|
-
message: "Each value within the given XML container must contain signed data!",
|
|
15647
|
+
message: this.chargy.GetMultilanguageText("Each value within the given XML container must contain signed data!"),
|
|
15623
15648
|
certainty: 0
|
|
15624
15649
|
};
|
|
15625
15650
|
const signedDataFormat = signedData.attributes.getNamedItem("format")?.value.trim().toLowerCase() ?? "";
|
|
@@ -15628,7 +15653,7 @@ var SAFEXML = class _SAFEXML {
|
|
|
15628
15653
|
else if (signedDataFormat !== commonSignedDataFormat)
|
|
15629
15654
|
return {
|
|
15630
15655
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15631
|
-
message: "Invalid mixture of different signed data formats within the given XML container!",
|
|
15656
|
+
message: this.chargy.GetMultilanguageText("Invalid mixture of different signed data formats within the given XML container!"),
|
|
15632
15657
|
certainty: 0
|
|
15633
15658
|
};
|
|
15634
15659
|
const signedDataEncoding = signedData.attributes.getNamedItem("encoding")?.value.trim().toLowerCase() ?? "";
|
|
@@ -15637,14 +15662,14 @@ var SAFEXML = class _SAFEXML {
|
|
|
15637
15662
|
else if (signedDataEncoding !== commonSignedDataEncoding)
|
|
15638
15663
|
return {
|
|
15639
15664
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15640
|
-
message: "Invalid mixture of different signed data encodings within the given XML container!",
|
|
15665
|
+
message: this.chargy.GetMultilanguageText("Invalid mixture of different signed data encodings within the given XML container!"),
|
|
15641
15666
|
certainty: 0
|
|
15642
15667
|
};
|
|
15643
15668
|
const signedDataValue = signedData.textContent.trim();
|
|
15644
15669
|
if (IsNullOrEmpty(signedDataValue))
|
|
15645
15670
|
return {
|
|
15646
15671
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15647
|
-
message: "The signed data value within the given XML container must not be empty!",
|
|
15672
|
+
message: this.chargy.GetMultilanguageText("The signed data value within the given XML container must not be empty!"),
|
|
15648
15673
|
certainty: 0
|
|
15649
15674
|
};
|
|
15650
15675
|
const publicKeyEncoding = publicKey?.attributes.getNamedItem("encoding")?.value.trim().toLowerCase() ?? "";
|
|
@@ -15653,7 +15678,7 @@ var SAFEXML = class _SAFEXML {
|
|
|
15653
15678
|
else if (publicKeyEncoding !== commonPublicKeyEncoding)
|
|
15654
15679
|
return {
|
|
15655
15680
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15656
|
-
message: "Invalid mixture of different public key encodings within the given XML container!",
|
|
15681
|
+
message: this.chargy.GetMultilanguageText("Invalid mixture of different public key encodings within the given XML container!"),
|
|
15657
15682
|
certainty: 0
|
|
15658
15683
|
};
|
|
15659
15684
|
const publicKeyValue = publicKey?.textContent.trim().replace(/\s+/g, "") ?? "";
|
|
@@ -15662,7 +15687,7 @@ var SAFEXML = class _SAFEXML {
|
|
|
15662
15687
|
else if (publicKeyValue !== commonPublicKey)
|
|
15663
15688
|
return {
|
|
15664
15689
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15665
|
-
message: "Invalid mixture of different public keys within the given XML container!",
|
|
15690
|
+
message: this.chargy.GetMultilanguageText("Invalid mixture of different public keys within the given XML container!"),
|
|
15666
15691
|
certainty: 0
|
|
15667
15692
|
};
|
|
15668
15693
|
switch (commonSignedDataEncoding) {
|
|
@@ -15682,7 +15707,7 @@ var SAFEXML = class _SAFEXML {
|
|
|
15682
15707
|
default:
|
|
15683
15708
|
return {
|
|
15684
15709
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15685
|
-
message: "Unkown signed data encoding within the given SAFE XML!",
|
|
15710
|
+
message: this.chargy.GetMultilanguageText("Unkown signed data encoding within the given SAFE XML!"),
|
|
15686
15711
|
certainty: 0
|
|
15687
15712
|
};
|
|
15688
15713
|
}
|
|
@@ -15704,7 +15729,7 @@ var SAFEXML = class _SAFEXML {
|
|
|
15704
15729
|
default:
|
|
15705
15730
|
return {
|
|
15706
15731
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15707
|
-
message: this.chargy.
|
|
15732
|
+
message: this.chargy.GetMultilanguageText("UnknownOrInvalidChargingSessionFormat"),
|
|
15708
15733
|
certainty: 0
|
|
15709
15734
|
};
|
|
15710
15735
|
}
|
|
@@ -15713,13 +15738,13 @@ var SAFEXML = class _SAFEXML {
|
|
|
15713
15738
|
} catch (exception) {
|
|
15714
15739
|
return {
|
|
15715
15740
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15716
|
-
message: "Exception occured: " + (exception instanceof Error ? exception.message : String(exception)),
|
|
15741
|
+
message: this.chargy.GetMultilanguageText("Exception occured: " + (exception instanceof Error ? exception.message : String(exception))),
|
|
15717
15742
|
certainty: 0
|
|
15718
15743
|
};
|
|
15719
15744
|
}
|
|
15720
15745
|
return {
|
|
15721
15746
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15722
|
-
message: this.chargy.
|
|
15747
|
+
message: this.chargy.GetMultilanguageText("UnknownOrInvalidChargingSessionFormat"),
|
|
15723
15748
|
certainty: 0
|
|
15724
15749
|
};
|
|
15725
15750
|
}
|
|
@@ -15768,14 +15793,14 @@ var XMLContainer = class {
|
|
|
15768
15793
|
default:
|
|
15769
15794
|
return {
|
|
15770
15795
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15771
|
-
message: "Unkown public key encoding within the given XML container!",
|
|
15796
|
+
message: this.chargy.GetMultilanguageText("Unkown public key encoding within the given XML container!"),
|
|
15772
15797
|
certainty: 0
|
|
15773
15798
|
};
|
|
15774
15799
|
}
|
|
15775
15800
|
if (IsNullOrEmpty(publicKeyValue))
|
|
15776
15801
|
return {
|
|
15777
15802
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15778
|
-
message: "The public key within the given XML container must not be empty!",
|
|
15803
|
+
message: this.chargy.GetMultilanguageText("The public key within the given XML container must not be empty!"),
|
|
15779
15804
|
certainty: 0
|
|
15780
15805
|
};
|
|
15781
15806
|
else if (common.publicKey == "")
|
|
@@ -15783,7 +15808,7 @@ var XMLContainer = class {
|
|
|
15783
15808
|
else if (publicKeyValue != common.publicKey)
|
|
15784
15809
|
return {
|
|
15785
15810
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15786
|
-
message: "Invalid mixture of different public keys within the given XML container!",
|
|
15811
|
+
message: this.chargy.GetMultilanguageText("Invalid mixture of different public keys within the given XML container!"),
|
|
15787
15812
|
certainty: 0
|
|
15788
15813
|
};
|
|
15789
15814
|
}
|
|
@@ -15808,14 +15833,14 @@ var XMLContainer = class {
|
|
|
15808
15833
|
default:
|
|
15809
15834
|
return {
|
|
15810
15835
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15811
|
-
message: "Unkown meter value signature encoding within the given XML container!",
|
|
15836
|
+
message: this.chargy.GetMultilanguageText("Unkown meter value signature encoding within the given XML container!"),
|
|
15812
15837
|
certainty: 0
|
|
15813
15838
|
};
|
|
15814
15839
|
}
|
|
15815
15840
|
if (IsNullOrEmpty(meterValueSignatureValue))
|
|
15816
15841
|
return {
|
|
15817
15842
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15818
|
-
message: "The meter value signature within the given XML container must not be empty!",
|
|
15843
|
+
message: this.chargy.GetMultilanguageText("The meter value signature within the given XML container must not be empty!"),
|
|
15819
15844
|
certainty: 0
|
|
15820
15845
|
};
|
|
15821
15846
|
common.meterValueSignatures.push(meterValueSignatureValue);
|
|
@@ -15826,7 +15851,7 @@ var XMLContainer = class {
|
|
|
15826
15851
|
else if (common.signatureMethod != signatureMethod)
|
|
15827
15852
|
return {
|
|
15828
15853
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15829
|
-
message: "Invalid mixture of different signature methods within the given XML container!",
|
|
15854
|
+
message: this.chargy.GetMultilanguageText("Invalid mixture of different signature methods within the given XML container!"),
|
|
15830
15855
|
certainty: 0
|
|
15831
15856
|
};
|
|
15832
15857
|
const encodingMethod = valueList[i]?.querySelector("encodingMethod")?.textContent.trim().toLowerCase() ?? "";
|
|
@@ -15835,7 +15860,7 @@ var XMLContainer = class {
|
|
|
15835
15860
|
else if (common.encodingMethod != encodingMethod)
|
|
15836
15861
|
return {
|
|
15837
15862
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15838
|
-
message: "Invalid mixture of different signed data formats within the given XML container!",
|
|
15863
|
+
message: this.chargy.GetMultilanguageText("Invalid mixture of different signed data formats within the given XML container!"),
|
|
15839
15864
|
certainty: 0
|
|
15840
15865
|
};
|
|
15841
15866
|
const encodedMeterValue = valueList[i]?.querySelector("encodedMeterValue");
|
|
@@ -15859,21 +15884,21 @@ var XMLContainer = class {
|
|
|
15859
15884
|
default:
|
|
15860
15885
|
return {
|
|
15861
15886
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15862
|
-
message: "Unkown signed data encoding within the given XML container!",
|
|
15887
|
+
message: this.chargy.GetMultilanguageText("Unkown signed data encoding within the given XML container!"),
|
|
15863
15888
|
certainty: 0
|
|
15864
15889
|
};
|
|
15865
15890
|
}
|
|
15866
15891
|
if (IsNullOrEmpty(signedDataValue))
|
|
15867
15892
|
return {
|
|
15868
15893
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15869
|
-
message: "The signed data value within the given XML container must not be empty!",
|
|
15894
|
+
message: this.chargy.GetMultilanguageText("The signed data value within the given XML container must not be empty!"),
|
|
15870
15895
|
certainty: 0
|
|
15871
15896
|
};
|
|
15872
15897
|
common.encodedMeterValues.push(signedDataValue);
|
|
15873
15898
|
} else
|
|
15874
15899
|
return {
|
|
15875
15900
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15876
|
-
message: "The signed data tag within the given XML container must not be empty!",
|
|
15901
|
+
message: this.chargy.GetMultilanguageText("The signed data tag within the given XML container must not be empty!"),
|
|
15877
15902
|
certainty: 0
|
|
15878
15903
|
};
|
|
15879
15904
|
}
|
|
@@ -15881,13 +15906,13 @@ var XMLContainer = class {
|
|
|
15881
15906
|
}
|
|
15882
15907
|
return {
|
|
15883
15908
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15884
|
-
message: this.chargy.
|
|
15909
|
+
message: this.chargy.GetMultilanguageText("UnknownOrInvalidChargingSessionFormat"),
|
|
15885
15910
|
certainty: 0
|
|
15886
15911
|
};
|
|
15887
15912
|
} catch (exception) {
|
|
15888
15913
|
return {
|
|
15889
15914
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
15890
|
-
message: "Exception occured: " + (exception instanceof Error ? exception.message : String(exception)),
|
|
15915
|
+
message: this.chargy.GetMultilanguageText("Exception occured: " + (exception instanceof Error ? exception.message : String(exception))),
|
|
15891
15916
|
certainty: 0
|
|
15892
15917
|
};
|
|
15893
15918
|
}
|
|
@@ -16009,7 +16034,7 @@ var ChargeIT = class {
|
|
|
16009
16034
|
if (firstMeterValue === void 0 || lastMeterValue === void 0)
|
|
16010
16035
|
return {
|
|
16011
16036
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
16012
|
-
message: this.chargy.
|
|
16037
|
+
message: this.chargy.GetMultilanguageText("UnknownOrInvalidChargingSessionFormat"),
|
|
16013
16038
|
certainty: 0
|
|
16014
16039
|
};
|
|
16015
16040
|
CTR["@id"] = lastMeterValue["transactionId"];
|
|
@@ -16194,38 +16219,38 @@ var ChargeIT = class {
|
|
|
16194
16219
|
{
|
|
16195
16220
|
const placeInfo = asJSONObject(SomeJSON["placeInfo"]);
|
|
16196
16221
|
if (placeInfo === void 0) {
|
|
16197
|
-
errors.push(this.chargy.
|
|
16222
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidPlaceInfo")));
|
|
16198
16223
|
secondaryErrors += 13;
|
|
16199
16224
|
} else {
|
|
16200
16225
|
const evseId = placeInfo["evseId"];
|
|
16201
16226
|
if (!isMandatoryString(evseId))
|
|
16202
|
-
errors.push(this.chargy.
|
|
16227
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidEVSEId")));
|
|
16203
16228
|
const address = asJSONObject(placeInfo["address"]);
|
|
16204
16229
|
if (address === void 0) {
|
|
16205
|
-
errors.push(this.chargy.
|
|
16230
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidAddress")));
|
|
16206
16231
|
secondaryErrors += 3;
|
|
16207
16232
|
} else {
|
|
16208
16233
|
if (!isMandatoryString(address["street"]))
|
|
16209
|
-
errors.push(this.chargy.
|
|
16234
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidAddressStreetName")));
|
|
16210
16235
|
if (!isMandatoryString(address["zipCode"]))
|
|
16211
|
-
errors.push(this.chargy.
|
|
16236
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidAddressZIPCode")));
|
|
16212
16237
|
if (!isMandatoryString(address["town"]))
|
|
16213
|
-
errors.push(this.chargy.
|
|
16238
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidAddressCityName")));
|
|
16214
16239
|
}
|
|
16215
16240
|
const geoLocation = asJSONObject(placeInfo["geoLocation"]);
|
|
16216
16241
|
if (geoLocation === void 0) {
|
|
16217
|
-
errors.push(this.chargy.
|
|
16242
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidGeoLocation")));
|
|
16218
16243
|
secondaryErrors += 2;
|
|
16219
16244
|
} else {
|
|
16220
16245
|
if (!isMandatoryNumber(geoLocation["lat"]))
|
|
16221
|
-
errors.push(this.chargy.
|
|
16246
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidGeoLocationLatitude")));
|
|
16222
16247
|
if (!isMandatoryNumber(geoLocation["lon"]))
|
|
16223
|
-
errors.push(this.chargy.
|
|
16248
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidGeoLocationLongitude")));
|
|
16224
16249
|
}
|
|
16225
16250
|
}
|
|
16226
16251
|
const signedMeterValues = SomeJSON["signedMeterValues"];
|
|
16227
16252
|
if (!isMandatoryJSONArray(signedMeterValues) || signedMeterValues.length < 2) {
|
|
16228
|
-
errors.push(this.chargy.
|
|
16253
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidSignedMeterValues")));
|
|
16229
16254
|
secondaryErrors += 2 * 39;
|
|
16230
16255
|
} else {
|
|
16231
16256
|
numberOfFormatChecks += 39 * (signedMeterValues.length - 2);
|
|
@@ -16234,7 +16259,7 @@ var ChargeIT = class {
|
|
|
16234
16259
|
for (const signedMeterValue of signedMeterValues.map((smv) => asJSONObject(smv))) {
|
|
16235
16260
|
if ((signedMeterValue?.["@context"] ?? oldChargeITMeterValueFormat) !== signedMeterValueContext) {
|
|
16236
16261
|
if (consistent)
|
|
16237
|
-
errors.push(this.chargy.
|
|
16262
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("InconsistentJSONContextInformation")));
|
|
16238
16263
|
consistent = false;
|
|
16239
16264
|
}
|
|
16240
16265
|
}
|
|
@@ -16247,122 +16272,122 @@ var ChargeIT = class {
|
|
|
16247
16272
|
for (const signedMeterValue of signedMeterValues) {
|
|
16248
16273
|
measurementCounter++;
|
|
16249
16274
|
if (!isMandatoryJSONObject(signedMeterValue)) {
|
|
16250
|
-
errors.push(this.chargy.
|
|
16275
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalidSignedMeterValueP", measurementCounter)));
|
|
16251
16276
|
secondaryErrors += 38;
|
|
16252
16277
|
} else {
|
|
16253
16278
|
if (!isMandatoryString(signedMeterValue["measurementId"]))
|
|
16254
|
-
errors.push(this.chargy.
|
|
16279
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeasurementIdP", measurementCounter)));
|
|
16255
16280
|
if (!isMandatoryNumber(signedMeterValue["timestamp"]))
|
|
16256
|
-
errors.push(this.chargy.
|
|
16281
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_TimestampP", measurementCounter)));
|
|
16257
16282
|
if (!isMandatoryString(signedMeterValue["transactionId"]))
|
|
16258
|
-
errors.push(this.chargy.
|
|
16283
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_TransactionIdP", measurementCounter)));
|
|
16259
16284
|
if (!isMandatoryString(signedMeterValue["signature"]))
|
|
16260
|
-
errors.push(this.chargy.
|
|
16285
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_SignatureP", measurementCounter)));
|
|
16261
16286
|
const meterInfo = signedMeterValue["meterInfo"];
|
|
16262
16287
|
if (!isMandatoryJSONObject(meterInfo)) {
|
|
16263
|
-
errors.push(this.chargy.
|
|
16288
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfoP", measurementCounter)));
|
|
16264
16289
|
secondaryErrors += 5;
|
|
16265
16290
|
} else {
|
|
16266
16291
|
if (!isMandatoryString(meterInfo["meterId"]))
|
|
16267
|
-
errors.push(this.chargy.
|
|
16292
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_MeterIdP", measurementCounter)));
|
|
16268
16293
|
if (!isMandatoryString(meterInfo["type"]))
|
|
16269
|
-
errors.push(this.chargy.
|
|
16294
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_TypeP", measurementCounter)));
|
|
16270
16295
|
if (!isMandatoryString(meterInfo["firmwareVersion"]))
|
|
16271
|
-
errors.push(this.chargy.
|
|
16296
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_FirmwareVersionP", measurementCounter)));
|
|
16272
16297
|
if (!isMandatoryString(meterInfo["publicKey"]))
|
|
16273
|
-
errors.push(this.chargy.
|
|
16298
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_PublicKeyP", measurementCounter)));
|
|
16274
16299
|
if (!isMandatoryString(meterInfo["manufacturer"]))
|
|
16275
|
-
errors.push(this.chargy.
|
|
16300
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_ManufacturerP", measurementCounter)));
|
|
16276
16301
|
if (isOptionalJSONArrayError(meterInfo["publicKeySignatures"]))
|
|
16277
|
-
errors.push(this.chargy.
|
|
16302
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("Invalid_SignedMeterValue_MeterInfo_PublicKeySignaturesP", measurementCounter)));
|
|
16278
16303
|
}
|
|
16279
16304
|
const contract = signedMeterValue["contract"];
|
|
16280
16305
|
if (!isMandatoryJSONObject(contract)) {
|
|
16281
|
-
errors.push(this.chargy.
|
|
16306
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_ContractP", measurementCounter)));
|
|
16282
16307
|
secondaryErrors += 7;
|
|
16283
16308
|
} else {
|
|
16284
16309
|
if (!isMandatoryString(contract["id"]))
|
|
16285
|
-
errors.push(this.chargy.
|
|
16310
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_Contract_IdP", measurementCounter)));
|
|
16286
16311
|
if (!isMandatoryString(contract["type"]))
|
|
16287
|
-
errors.push(this.chargy.
|
|
16312
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_Contract_TypeP", measurementCounter)));
|
|
16288
16313
|
if (!isMandatoryNumber(contract["timestamp"]))
|
|
16289
|
-
errors.push(this.chargy.
|
|
16314
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_Contract_TimestampP", measurementCounter)));
|
|
16290
16315
|
const timestampLocal = contract["timestampLocal"];
|
|
16291
16316
|
if (!isMandatoryJSONObject(timestampLocal)) {
|
|
16292
|
-
errors.push(this.chargy.
|
|
16317
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_Contract_TimestampLocalP", measurementCounter)));
|
|
16293
16318
|
secondaryErrors += 3;
|
|
16294
16319
|
} else {
|
|
16295
16320
|
if (!isMandatoryNumber(timestampLocal["timestamp"]))
|
|
16296
|
-
errors.push(this.chargy.
|
|
16321
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_Contract_TimestampLocal_TimestampP", measurementCounter)));
|
|
16297
16322
|
if (!isMandatoryNumber(timestampLocal["localOffset"]))
|
|
16298
|
-
errors.push(this.chargy.
|
|
16323
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_Contract_TimestampLocal_LocalOffsetP", measurementCounter)));
|
|
16299
16324
|
if (!isMandatoryNumber(timestampLocal["seasonOffset"]))
|
|
16300
|
-
errors.push(this.chargy.
|
|
16325
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_Contract_TimestampLocal_SeasonOffsetP", measurementCounter)));
|
|
16301
16326
|
}
|
|
16302
16327
|
}
|
|
16303
16328
|
const measuredValue = signedMeterValue["measuredValue"];
|
|
16304
16329
|
if (!isMandatoryJSONObject(measuredValue)) {
|
|
16305
|
-
errors.push(this.chargy.
|
|
16330
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeasuredValueP", measurementCounter)));
|
|
16306
16331
|
secondaryErrors += 9;
|
|
16307
16332
|
} else {
|
|
16308
16333
|
if (!isMandatoryString(measuredValue["value"]))
|
|
16309
|
-
errors.push(this.chargy.
|
|
16334
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeasuredValue_ValueP", measurementCounter)));
|
|
16310
16335
|
if (!isMandatoryString(measuredValue["unit"]))
|
|
16311
|
-
errors.push(this.chargy.
|
|
16336
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeasuredValue_UnitP", measurementCounter)));
|
|
16312
16337
|
if (!isMandatoryNumber(measuredValue["scale"]))
|
|
16313
|
-
errors.push(this.chargy.
|
|
16338
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeasuredValue_ScaleP", measurementCounter)));
|
|
16314
16339
|
if (!isMandatoryString(measuredValue["valueType"]))
|
|
16315
|
-
errors.push(this.chargy.
|
|
16340
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeasuredValue_ValueTypeP", measurementCounter)));
|
|
16316
16341
|
if (!isMandatoryNumber(measuredValue["unitEncoded"]))
|
|
16317
|
-
errors.push(this.chargy.
|
|
16342
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeasuredValue_UnitEncodedP", measurementCounter)));
|
|
16318
16343
|
const timestampLocal = measuredValue["timestampLocal"];
|
|
16319
16344
|
if (!isMandatoryJSONObject(timestampLocal)) {
|
|
16320
|
-
errors.push(this.chargy.
|
|
16345
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalidMeasuredValueTimestampLocalP", measurementCounter)));
|
|
16321
16346
|
secondaryErrors += 3;
|
|
16322
16347
|
} else {
|
|
16323
16348
|
if (!isMandatoryNumber(timestampLocal["timestamp"]))
|
|
16324
|
-
errors.push(this.chargy.
|
|
16349
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalidMeasuredValueTimestampLocalTimestampP", measurementCounter)));
|
|
16325
16350
|
if (!isMandatoryNumber(timestampLocal["localOffset"]))
|
|
16326
|
-
errors.push(this.chargy.
|
|
16351
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalidMeasuredValueTimestampLocalOffsetP", measurementCounter)));
|
|
16327
16352
|
if (!isMandatoryNumber(timestampLocal["seasonOffset"]))
|
|
16328
|
-
errors.push(this.chargy.
|
|
16353
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalidMeasuredValueTimestampSeasonOffsetP", measurementCounter)));
|
|
16329
16354
|
}
|
|
16330
16355
|
}
|
|
16331
16356
|
const measurand = signedMeterValue["measurand"];
|
|
16332
16357
|
if (!isMandatoryJSONObject(measurand)) {
|
|
16333
|
-
errors.push(this.chargy.
|
|
16358
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeasurandP", measurementCounter)));
|
|
16334
16359
|
secondaryErrors += 2;
|
|
16335
16360
|
} else {
|
|
16336
16361
|
if (!isMandatoryString(measurand["id"]))
|
|
16337
|
-
errors.push(this.chargy.
|
|
16362
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_Measurand_IdP", measurementCounter)));
|
|
16338
16363
|
if (!isMandatoryString(measurand["name"]))
|
|
16339
|
-
errors.push(this.chargy.
|
|
16364
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_Measurand_NameP", measurementCounter)));
|
|
16340
16365
|
}
|
|
16341
16366
|
const additionalInfo = signedMeterValue["additionalInfo"];
|
|
16342
16367
|
if (!isMandatoryJSONObject(additionalInfo)) {
|
|
16343
|
-
errors.push(this.chargy.
|
|
16368
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_AdditionalInformationP", measurementCounter)));
|
|
16344
16369
|
secondaryErrors += 4;
|
|
16345
16370
|
} else {
|
|
16346
16371
|
if (!isMandatoryString(additionalInfo["status"]))
|
|
16347
|
-
errors.push(this.chargy.
|
|
16372
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_AdditionalInformation_StatusP", measurementCounter)));
|
|
16348
16373
|
const indexes = additionalInfo["indexes"];
|
|
16349
16374
|
if (!isMandatoryJSONObject(indexes)) {
|
|
16350
|
-
errors.push(this.chargy.
|
|
16375
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_AdditionalInformation_IndexesP", measurementCounter)));
|
|
16351
16376
|
secondaryErrors += 2;
|
|
16352
16377
|
} else {
|
|
16353
16378
|
if (!isMandatoryNumber(indexes["timer"]))
|
|
16354
|
-
errors.push(this.chargy.
|
|
16379
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_AdditionalInformation_Indexes_TimerP", measurementCounter)));
|
|
16355
16380
|
if (!isMandatoryString(indexes["logBook"]))
|
|
16356
|
-
errors.push(this.chargy.
|
|
16381
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_AdditionalInformation_Indexes_LogBookP", measurementCounter)));
|
|
16357
16382
|
}
|
|
16358
16383
|
}
|
|
16359
16384
|
const chargePoint = signedMeterValue["chargePoint"];
|
|
16360
16385
|
if (!isMandatoryJSONObject(chargePoint)) {
|
|
16361
|
-
errors.push(this.chargy.
|
|
16386
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_ChargePointInformationP", measurementCounter)));
|
|
16362
16387
|
secondaryErrors += 1;
|
|
16363
16388
|
} else {
|
|
16364
16389
|
if (!isMandatoryString(chargePoint["softwareVersion"]))
|
|
16365
|
-
errors.push(this.chargy.
|
|
16390
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_ChargePointInformation_SoftwareVersionP", measurementCounter)));
|
|
16366
16391
|
}
|
|
16367
16392
|
}
|
|
16368
16393
|
}
|
|
@@ -16540,7 +16565,7 @@ var ChargeIT = class {
|
|
|
16540
16565
|
} catch (exception) {
|
|
16541
16566
|
return {
|
|
16542
16567
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
16543
|
-
message: "Exception occured: " + (exception instanceof Error ? exception.message : String(exception)),
|
|
16568
|
+
message: this.chargy.GetMultilanguageText("Exception occured: " + (exception instanceof Error ? exception.message : String(exception))),
|
|
16544
16569
|
errors,
|
|
16545
16570
|
warnings,
|
|
16546
16571
|
certainty: (numberOfFormatChecks - errors.length - secondaryErrors) / numberOfFormatChecks
|
|
@@ -16613,101 +16638,101 @@ var ChargeIT = class {
|
|
|
16613
16638
|
const totalCosts_flat_cost = totalCosts_flat?.["cost"];
|
|
16614
16639
|
const signedMeterValues = SomeJSON["signedMeterValues"];
|
|
16615
16640
|
if (!isMandatoryString(chargingSessionId))
|
|
16616
|
-
errors.push(this.chargy.
|
|
16641
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid charge transparency record identification!")));
|
|
16617
16642
|
if (!isMandatoryJSONObject(chargePointInfo)) {
|
|
16618
|
-
errors.push(this.chargy.
|
|
16643
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidChargePointInfo")));
|
|
16619
16644
|
secondaryErrors += 19;
|
|
16620
16645
|
} else {
|
|
16621
16646
|
if (!isMandatoryString(evseId))
|
|
16622
|
-
errors.push(this.chargy.
|
|
16647
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidEVSEIdentification")));
|
|
16623
16648
|
if (!isMandatoryJSONObject(placeInfo)) {
|
|
16624
|
-
errors.push(this.chargy.
|
|
16649
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidPlaceInfo")));
|
|
16625
16650
|
secondaryErrors += 8;
|
|
16626
16651
|
} else {
|
|
16627
16652
|
if (!isMandatoryJSONObject(geoLocation)) {
|
|
16628
|
-
errors.push(this.chargy.
|
|
16653
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidGeoLocation")));
|
|
16629
16654
|
secondaryErrors += 2;
|
|
16630
16655
|
} else {
|
|
16631
16656
|
if (!isMandatoryNumber(geoLocation_lat))
|
|
16632
|
-
errors.push(this.chargy.
|
|
16657
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidGeoLocationLatitude")));
|
|
16633
16658
|
if (!isMandatoryNumber(geoLocation_lon))
|
|
16634
|
-
errors.push(this.chargy.
|
|
16659
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidGeoLocationLongitude")));
|
|
16635
16660
|
}
|
|
16636
16661
|
if (!isMandatoryJSONObject(address)) {
|
|
16637
|
-
errors.push(this.chargy.
|
|
16662
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidAddress")));
|
|
16638
16663
|
secondaryErrors += 4;
|
|
16639
16664
|
} else {
|
|
16640
16665
|
if (!isMandatoryString(address_street))
|
|
16641
|
-
errors.push(this.chargy.
|
|
16666
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidAddressStreetName")));
|
|
16642
16667
|
if (!isMandatoryString(address_zipCode))
|
|
16643
|
-
errors.push(this.chargy.
|
|
16668
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidAddressZIPCode")));
|
|
16644
16669
|
if (!isMandatoryString(address_town))
|
|
16645
|
-
errors.push(this.chargy.
|
|
16670
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidAddressCityName")));
|
|
16646
16671
|
if (!isMandatoryString(address_country))
|
|
16647
|
-
errors.push(this.chargy.
|
|
16672
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidAddressCountryName")));
|
|
16648
16673
|
}
|
|
16649
16674
|
}
|
|
16650
16675
|
}
|
|
16651
16676
|
if (!isMandatoryJSONObject(chargingStationInfo)) {
|
|
16652
|
-
errors.push(this.chargy.
|
|
16677
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidChargingStationInfo")));
|
|
16653
16678
|
secondaryErrors += 5;
|
|
16654
16679
|
} else {
|
|
16655
16680
|
if (!isOptionalString(chargingStation_manufacturer))
|
|
16656
|
-
errors.push(this.chargy.
|
|
16681
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station manufacturer!")));
|
|
16657
16682
|
if (!isOptionalString(chargingStation_type))
|
|
16658
|
-
errors.push(this.chargy.
|
|
16683
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station type!")));
|
|
16659
16684
|
if (!isOptionalString(chargingStation_serialNumber))
|
|
16660
|
-
errors.push(this.chargy.
|
|
16685
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station serial number!")));
|
|
16661
16686
|
if (!isOptionalString(chargingStation_controllerSoftwareVersion))
|
|
16662
|
-
errors.push(this.chargy.
|
|
16687
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station controller software version!")));
|
|
16663
16688
|
if (!isOptionalString(chargingStation_compliance))
|
|
16664
|
-
errors.push(this.chargy.
|
|
16689
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station compliance!")));
|
|
16665
16690
|
if (!isOptionalURL(chargingStation_complianceURL))
|
|
16666
|
-
errors.push(this.chargy.
|
|
16691
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station compliance URL!")));
|
|
16667
16692
|
if (!isOptionalString(chargingStation_conformity))
|
|
16668
|
-
errors.push(this.chargy.
|
|
16693
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station conformity!")));
|
|
16669
16694
|
if (!isOptionalURL(chargingStation_conformity_URL))
|
|
16670
|
-
errors.push(this.chargy.
|
|
16695
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station conformity URL!")));
|
|
16671
16696
|
if (!isOptionalURL(chargingStation_conformity_certificateId))
|
|
16672
|
-
errors.push(this.chargy.
|
|
16697
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station conformity certificate identification!")));
|
|
16673
16698
|
if (!isOptionalString(chargingStation_calibration))
|
|
16674
|
-
errors.push(this.chargy.
|
|
16699
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station calibration!")));
|
|
16675
16700
|
if (!isOptionalURL(chargingStation_calibration_URL))
|
|
16676
|
-
errors.push(this.chargy.
|
|
16701
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station calibration URL!")));
|
|
16677
16702
|
if (!isOptionalURL(chargingStation_calibration_certificateId))
|
|
16678
|
-
errors.push(this.chargy.
|
|
16703
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Invalid charging station calibration certificate identification!")));
|
|
16679
16704
|
}
|
|
16680
16705
|
if (meterInfo) {
|
|
16681
16706
|
if (!isOptionalString(meterInfo_meterId))
|
|
16682
|
-
errors.push(this.chargy.
|
|
16707
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_MeterIdP", 1)));
|
|
16683
16708
|
if (!isOptionalString(meterInfo_manufacturer))
|
|
16684
|
-
errors.push(this.chargy.
|
|
16709
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_ManufacturerP", 1)));
|
|
16685
16710
|
if (!isOptionalString(meterInfo_manufacturerURL))
|
|
16686
|
-
errors.push(this.chargy.
|
|
16711
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_ManufacturerP", 1)));
|
|
16687
16712
|
if (!isOptionalString(meterInfo_model))
|
|
16688
|
-
errors.push(this.chargy.
|
|
16713
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_ManufacturerP", 1)));
|
|
16689
16714
|
if (!isOptionalString(meterInfo_modelURL))
|
|
16690
|
-
errors.push(this.chargy.
|
|
16715
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_ManufacturerP", 1)));
|
|
16691
16716
|
if (!isOptionalString(meterInfo_firmwareVersion))
|
|
16692
|
-
errors.push(this.chargy.
|
|
16717
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_FirmwareVersionP", 1)));
|
|
16693
16718
|
if (!isOptionalString(meterInfo_hardwareVersion))
|
|
16694
|
-
errors.push(this.chargy.
|
|
16719
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_FirmwareVersionP", 1)));
|
|
16695
16720
|
if (!isOptionalString(meterInfo_publicKey))
|
|
16696
|
-
errors.push(this.chargy.
|
|
16721
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_PublicKeyP", 1)));
|
|
16697
16722
|
if (!isOptionalString(meterInfo_publicKeyFormat))
|
|
16698
|
-
errors.push(this.chargy.
|
|
16723
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_PublicKeyP", 1)));
|
|
16699
16724
|
if (!isOptionalString(meterInfo_publicKeyEncoding))
|
|
16700
|
-
errors.push(this.chargy.
|
|
16725
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_PublicKeyP", 1)));
|
|
16701
16726
|
if (!isOptionalString(meterInfo_signatureFormat))
|
|
16702
|
-
errors.push(this.chargy.
|
|
16727
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_PublicKeyP", 1)));
|
|
16703
16728
|
if (!isOptionalString(meterInfo_signatureEncoding))
|
|
16704
|
-
errors.push(this.chargy.
|
|
16729
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_PublicKeyP", 1)));
|
|
16705
16730
|
}
|
|
16706
16731
|
if (connectorInfo) {
|
|
16707
16732
|
if (!isOptionalString(connectorInfo_type))
|
|
16708
|
-
errors.push(this.chargy.
|
|
16733
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_MeterIdP", 1)));
|
|
16709
16734
|
if (!isOptionalString(connectorInfo_losses))
|
|
16710
|
-
errors.push(this.chargy.
|
|
16735
|
+
errors.push(CreateError(this.chargy.GetMultilanguageTextWithParameter("MissingOrInvalid_SignedMeterValue_MeterInfo_MeterIdP", 1)));
|
|
16711
16736
|
}
|
|
16712
16737
|
if (isMandatoryJSONArray(chargingTariffs)) {
|
|
16713
16738
|
for (let i = 0; i < chargingTariffs.length; i++) {
|
|
@@ -16715,40 +16740,40 @@ var ChargeIT = class {
|
|
|
16715
16740
|
}
|
|
16716
16741
|
if (totalCosts) {
|
|
16717
16742
|
if (!isMandatoryNumber(totalCosts_total))
|
|
16718
|
-
errors.push(this.chargy.
|
|
16743
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid total costs within the charging costs!")));
|
|
16719
16744
|
if (!isMandatoryString(totalCosts_currency))
|
|
16720
|
-
errors.push(this.chargy.
|
|
16745
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid currency within the charging costs!")));
|
|
16721
16746
|
if (totalCosts_reservation) {
|
|
16722
16747
|
if (!isMandatoryNumber(totalCosts_reservation_cost))
|
|
16723
|
-
errors.push(this.chargy.
|
|
16748
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid reservation cost within the charging costs!")));
|
|
16724
16749
|
if (!isMandatoryString(totalCosts_reservation_unit))
|
|
16725
|
-
errors.push(this.chargy.
|
|
16750
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid reservation unit within the charging costs!")));
|
|
16726
16751
|
}
|
|
16727
16752
|
if (totalCosts_energy) {
|
|
16728
16753
|
if (!isMandatoryNumber(totalCosts_energy_cost))
|
|
16729
|
-
errors.push(this.chargy.
|
|
16754
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid energy cost within the charging costs!")));
|
|
16730
16755
|
if (!isMandatoryString(totalCosts_energy_unit))
|
|
16731
|
-
errors.push(this.chargy.
|
|
16756
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid energy unit within the charging costs!")));
|
|
16732
16757
|
}
|
|
16733
16758
|
if (totalCosts_time) {
|
|
16734
16759
|
if (!isMandatoryNumber(totalCosts_time_cost))
|
|
16735
|
-
errors.push(this.chargy.
|
|
16760
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid time cost within the charging costs!")));
|
|
16736
16761
|
if (!isMandatoryString(totalCosts_time_unit))
|
|
16737
|
-
errors.push(this.chargy.
|
|
16762
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid time unit within the charging costs!")));
|
|
16738
16763
|
}
|
|
16739
16764
|
if (totalCosts_idle) {
|
|
16740
16765
|
if (!isMandatoryNumber(totalCosts_idle_cost))
|
|
16741
|
-
errors.push(this.chargy.
|
|
16766
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid idle cost within the charging costs!")));
|
|
16742
16767
|
if (!isMandatoryString(totalCosts_idle_unit))
|
|
16743
|
-
errors.push(this.chargy.
|
|
16768
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid idle unit within the charging costs!")));
|
|
16744
16769
|
}
|
|
16745
16770
|
if (totalCosts_flat) {
|
|
16746
16771
|
if (!isMandatoryNumber(totalCosts_flat_cost))
|
|
16747
|
-
errors.push(this.chargy.
|
|
16772
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("Missing or invalid flat cost within the charging costs!")));
|
|
16748
16773
|
}
|
|
16749
16774
|
}
|
|
16750
16775
|
if (!isMandatoryJSONArray(signedMeterValues) || signedMeterValues.length < 2) {
|
|
16751
|
-
errors.push(this.chargy.
|
|
16776
|
+
errors.push(CreateError(this.chargy.GetMultilanguageText("MissingOrInvalidSignedMeterValues")));
|
|
16752
16777
|
secondaryErrors += 2 * 39;
|
|
16753
16778
|
} else {
|
|
16754
16779
|
const firstSMV = asJSONObject(signedMeterValues[0]);
|
|
@@ -16758,7 +16783,7 @@ var ChargeIT = class {
|
|
|
16758
16783
|
const context = asString(currentSMV?.["@context"])?.trim() ?? asString(currentSMV?.["format"])?.trim() ?? null;
|
|
16759
16784
|
if (smvContext !== context) return {
|
|
16760
16785
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
16761
|
-
message: "Inconsistent signed meter value format!",
|
|
16786
|
+
message: this.chargy.GetMultilanguageText("Inconsistent signed meter value format!"),
|
|
16762
16787
|
certainty: 1
|
|
16763
16788
|
};
|
|
16764
16789
|
}
|
|
@@ -16907,7 +16932,7 @@ var ChargeIT = class {
|
|
|
16907
16932
|
} catch (exception) {
|
|
16908
16933
|
return {
|
|
16909
16934
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
16910
|
-
message: "Exception occured: " + (exception instanceof Error ? exception.message : String(exception)),
|
|
16935
|
+
message: this.chargy.GetMultilanguageText("Exception occured: " + (exception instanceof Error ? exception.message : String(exception))),
|
|
16911
16936
|
errors,
|
|
16912
16937
|
warnings,
|
|
16913
16938
|
certainty: (numberOfFormatChecks - errors.length - secondaryErrors) / numberOfFormatChecks
|
|
@@ -16916,7 +16941,7 @@ var ChargeIT = class {
|
|
|
16916
16941
|
}
|
|
16917
16942
|
return {
|
|
16918
16943
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
16919
|
-
message: "No chargeIT charge transparency record",
|
|
16944
|
+
message: this.chargy.GetMultilanguageText("No chargeIT charge transparency record"),
|
|
16920
16945
|
errors,
|
|
16921
16946
|
warnings,
|
|
16922
16947
|
certainty: 0
|
|
@@ -16935,7 +16960,7 @@ var ChargePoint = class {
|
|
|
16935
16960
|
if (!isMandatoryJSONObject(SomeJSON))
|
|
16936
16961
|
return {
|
|
16937
16962
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
16938
|
-
message: this.chargy.
|
|
16963
|
+
message: this.chargy.GetMultilanguageText("UnknownOrInvalidChargingSessionFormat"),
|
|
16939
16964
|
certainty: 0
|
|
16940
16965
|
};
|
|
16941
16966
|
if (SomeJSON["company_name"] !== void 0 && SomeJSON["display_unit"] !== void 0 && //SomeJSON["energy"] !== undefined &&
|
|
@@ -17258,13 +17283,13 @@ var ChargePoint = class {
|
|
|
17258
17283
|
} catch (exception) {
|
|
17259
17284
|
return {
|
|
17260
17285
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
17261
|
-
message: "Exception occured: " + (exception instanceof Error ? exception.message : String(exception)),
|
|
17286
|
+
message: this.chargy.GetMultilanguageText("Exception occured: " + (exception instanceof Error ? exception.message : String(exception))),
|
|
17262
17287
|
certainty: 0
|
|
17263
17288
|
};
|
|
17264
17289
|
}
|
|
17265
17290
|
return {
|
|
17266
17291
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
17267
|
-
message: this.chargy.
|
|
17292
|
+
message: this.chargy.GetMultilanguageText("UnknownOrInvalidChargingSessionFormat"),
|
|
17268
17293
|
certainty: 0
|
|
17269
17294
|
};
|
|
17270
17295
|
}
|
|
@@ -17287,7 +17312,7 @@ var ChargePointCrypt01 = class extends ACrypt {
|
|
|
17287
17312
|
if (chargingSession.ctr === void 0) {
|
|
17288
17313
|
return {
|
|
17289
17314
|
status: "InvalidSignature" /* InvalidSignature */,
|
|
17290
|
-
message: this.chargy.
|
|
17315
|
+
message: this.chargy.GetMultilanguageText("InvalidSignature"),
|
|
17291
17316
|
certainty: 0
|
|
17292
17317
|
};
|
|
17293
17318
|
}
|
|
@@ -17323,7 +17348,7 @@ var ChargePointCrypt01 = class extends ACrypt {
|
|
|
17323
17348
|
if (publicKeys.length == 0)
|
|
17324
17349
|
return {
|
|
17325
17350
|
status: "PublicKeyNotFound" /* PublicKeyNotFound */,
|
|
17326
|
-
message: this.chargy.
|
|
17351
|
+
message: this.chargy.GetMultilanguageText("Public key notFound"),
|
|
17327
17352
|
certainty: 0
|
|
17328
17353
|
};
|
|
17329
17354
|
if (plainText !== "" && chargingSession.signature != null && chargingSession.signature !== "") {
|
|
@@ -17398,7 +17423,7 @@ var ChargePointCrypt01 = class extends ACrypt {
|
|
|
17398
17423
|
if (measurementValue.result?.status !== "ValidSignature" /* ValidSignature */ && measurementValue.result?.status !== "NoOperation" /* NoOperation */) {
|
|
17399
17424
|
return {
|
|
17400
17425
|
status: "InvalidSignature" /* InvalidSignature */,
|
|
17401
|
-
message: this.chargy.
|
|
17426
|
+
message: this.chargy.GetMultilanguageText("InvalidSignature"),
|
|
17402
17427
|
certainty: 0
|
|
17403
17428
|
};
|
|
17404
17429
|
}
|
|
@@ -17455,7 +17480,7 @@ var ChargePointCrypt01 = class extends ACrypt {
|
|
|
17455
17480
|
} catch (exception) {
|
|
17456
17481
|
return {
|
|
17457
17482
|
status: "InvalidSignature" /* InvalidSignature */,
|
|
17458
|
-
message: "Exception occured: " + (exception instanceof Error ? exception.message : String(exception)),
|
|
17483
|
+
message: this.chargy.GetMultilanguageText("Exception occured: " + (exception instanceof Error ? exception.message : String(exception))),
|
|
17459
17484
|
certainty: 0
|
|
17460
17485
|
};
|
|
17461
17486
|
}
|
|
@@ -17893,7 +17918,7 @@ var validationRules_default = {
|
|
|
17893
17918
|
var Chargy = class {
|
|
17894
17919
|
//#region Data
|
|
17895
17920
|
i18n;
|
|
17896
|
-
|
|
17921
|
+
uiLanguages;
|
|
17897
17922
|
elliptic;
|
|
17898
17923
|
moment;
|
|
17899
17924
|
asn1;
|
|
@@ -17911,9 +17936,9 @@ var Chargy = class {
|
|
|
17911
17936
|
currentCTR = {};
|
|
17912
17937
|
internalCTR = {};
|
|
17913
17938
|
//#endregion
|
|
17914
|
-
constructor(i18n,
|
|
17939
|
+
constructor(i18n, UILanguages, elliptic, moment2, asn1, base32Decode, ShowPKIDetails, validationRules = validationRules_default) {
|
|
17915
17940
|
this.i18n = i18n;
|
|
17916
|
-
this.
|
|
17941
|
+
this.uiLanguages = this.NormalizeUILanguages(UILanguages);
|
|
17917
17942
|
this.elliptic = elliptic;
|
|
17918
17943
|
this.moment = moment2;
|
|
17919
17944
|
this.asn1 = asn1;
|
|
@@ -17921,8 +17946,38 @@ var Chargy = class {
|
|
|
17921
17946
|
this.showPKIDetails = ShowPKIDetails;
|
|
17922
17947
|
this.validationRules = validationRules;
|
|
17923
17948
|
}
|
|
17924
|
-
|
|
17925
|
-
this.
|
|
17949
|
+
SetUILanguages(UILanguages) {
|
|
17950
|
+
this.uiLanguages = this.NormalizeUILanguages(UILanguages);
|
|
17951
|
+
}
|
|
17952
|
+
NormalizeUILanguages(UILanguages) {
|
|
17953
|
+
const languages = new Array();
|
|
17954
|
+
for (const language of UILanguages) {
|
|
17955
|
+
const normalized = language.trim();
|
|
17956
|
+
if (normalized.length > 0 && !languages.includes(normalized)) {
|
|
17957
|
+
languages.push(normalized);
|
|
17958
|
+
}
|
|
17959
|
+
}
|
|
17960
|
+
return languages.length > 0 ? languages : ["en"];
|
|
17961
|
+
}
|
|
17962
|
+
FindBestMultilanguageText(Text) {
|
|
17963
|
+
for (const language of this.uiLanguages) {
|
|
17964
|
+
const localLanguage = Text[language];
|
|
17965
|
+
if (localLanguage !== void 0)
|
|
17966
|
+
return localLanguage;
|
|
17967
|
+
}
|
|
17968
|
+
const english = Text["en"];
|
|
17969
|
+
if (english !== void 0)
|
|
17970
|
+
return english;
|
|
17971
|
+
return Object.values(Text).find((value) => value !== void 0);
|
|
17972
|
+
}
|
|
17973
|
+
CompleteMultilanguageText(Text, fallbackText) {
|
|
17974
|
+
const result = {
|
|
17975
|
+
...Text ?? {}
|
|
17976
|
+
};
|
|
17977
|
+
const fallback = this.FindBestMultilanguageText(result) ?? fallbackText;
|
|
17978
|
+
for (const language of this.uiLanguages)
|
|
17979
|
+
result[language] ??= fallback;
|
|
17980
|
+
return result;
|
|
17926
17981
|
}
|
|
17927
17982
|
PublicKeyIdFromFileName(fileName) {
|
|
17928
17983
|
return (fileName.indexOf(".") > -1 ? fileName.substring(0, fileName.indexOf(".")) : fileName).replace(/[-_]?public[-_]?key/i, "");
|
|
@@ -18101,27 +18156,36 @@ var Chargy = class {
|
|
|
18101
18156
|
GetLocalizedMessage(Text) {
|
|
18102
18157
|
const multiLanguage = this.i18n[Text];
|
|
18103
18158
|
if (multiLanguage !== void 0) {
|
|
18104
|
-
const
|
|
18105
|
-
if (
|
|
18106
|
-
return
|
|
18107
|
-
const english = multiLanguage["en"];
|
|
18108
|
-
if (english !== void 0)
|
|
18109
|
-
return english;
|
|
18159
|
+
const localizedMessage = this.FindBestMultilanguageText(multiLanguage);
|
|
18160
|
+
if (localizedMessage !== void 0)
|
|
18161
|
+
return localizedMessage;
|
|
18110
18162
|
}
|
|
18111
18163
|
return Text;
|
|
18112
18164
|
}
|
|
18165
|
+
GetMultilanguageText(Text) {
|
|
18166
|
+
const multiLanguage = this.i18n[Text];
|
|
18167
|
+
return this.CompleteMultilanguageText(multiLanguage, Text);
|
|
18168
|
+
}
|
|
18113
18169
|
GetLocalizedMessageWithParameter(Text, Parameter) {
|
|
18114
18170
|
const multiLanguage = this.i18n[Text];
|
|
18115
18171
|
if (multiLanguage !== void 0) {
|
|
18116
|
-
const
|
|
18117
|
-
if (
|
|
18118
|
-
return
|
|
18119
|
-
const english = multiLanguage["en"];
|
|
18120
|
-
if (english !== void 0)
|
|
18121
|
-
return english.replace("%p", String(Parameter));
|
|
18172
|
+
const localizedMessage = this.FindBestMultilanguageText(multiLanguage);
|
|
18173
|
+
if (localizedMessage !== void 0)
|
|
18174
|
+
return localizedMessage.replace("%p", String(Parameter));
|
|
18122
18175
|
}
|
|
18123
18176
|
return Text.replace("%p", String(Parameter));
|
|
18124
18177
|
}
|
|
18178
|
+
GetMultilanguageTextWithParameter(Text, Parameter) {
|
|
18179
|
+
const multiLanguage = this.i18n[Text];
|
|
18180
|
+
const parameterizedText = {};
|
|
18181
|
+
if (multiLanguage !== void 0) {
|
|
18182
|
+
for (const [language, message] of Object.entries(multiLanguage)) {
|
|
18183
|
+
if (message !== void 0)
|
|
18184
|
+
parameterizedText[language] = message.replace("%p", String(Parameter));
|
|
18185
|
+
}
|
|
18186
|
+
}
|
|
18187
|
+
return this.CompleteMultilanguageText(parameterizedText, Text.replace("%p", String(Parameter)));
|
|
18188
|
+
}
|
|
18125
18189
|
//#endregion
|
|
18126
18190
|
//#region GetDevices...
|
|
18127
18191
|
GetChargingPool = (Id) => {
|
|
@@ -18493,7 +18557,7 @@ var Chargy = class {
|
|
|
18493
18557
|
async DetectAndConvertContentFormat(FileInfos) {
|
|
18494
18558
|
if (FileInfos.length == 0) return {
|
|
18495
18559
|
status: "NoChargeTransparencyRecordsFound" /* NoChargeTransparencyRecordsFound */,
|
|
18496
|
-
message: this.
|
|
18560
|
+
message: this.GetMultilanguageText("No charge transparency records found!"),
|
|
18497
18561
|
certainty: 0
|
|
18498
18562
|
};
|
|
18499
18563
|
let expandedFiles = new Array();
|
|
@@ -18603,7 +18667,7 @@ var Chargy = class {
|
|
|
18603
18667
|
} catch (exception) {
|
|
18604
18668
|
processedFile.result = {
|
|
18605
18669
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
18606
|
-
message: this.
|
|
18670
|
+
message: this.GetMultilanguageText("UnknownOrInvalidXMLChargeTransparencyFormat"),
|
|
18607
18671
|
exception,
|
|
18608
18672
|
certainty: 0
|
|
18609
18673
|
};
|
|
@@ -18643,7 +18707,7 @@ var Chargy = class {
|
|
|
18643
18707
|
} catch (exception) {
|
|
18644
18708
|
processedFile.result = {
|
|
18645
18709
|
status: "InvalidPublicKey" /* InvalidPublicKey */,
|
|
18646
|
-
message: this.
|
|
18710
|
+
message: this.GetMultilanguageText("UnknownOrInvalidPublicKeyFormat"),
|
|
18647
18711
|
exception,
|
|
18648
18712
|
certainty: 0
|
|
18649
18713
|
};
|
|
@@ -18657,7 +18721,7 @@ var Chargy = class {
|
|
|
18657
18721
|
} catch (exception) {
|
|
18658
18722
|
processedFile.result = {
|
|
18659
18723
|
status: "InvalidPublicKey" /* InvalidPublicKey */,
|
|
18660
|
-
message: this.
|
|
18724
|
+
message: this.GetMultilanguageText("UnknownOrInvalidPublicKeyFormat"),
|
|
18661
18725
|
exception,
|
|
18662
18726
|
certainty: 0
|
|
18663
18727
|
};
|
|
@@ -18706,7 +18770,7 @@ var Chargy = class {
|
|
|
18706
18770
|
} catch (exception) {
|
|
18707
18771
|
processedFile.result = {
|
|
18708
18772
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
18709
|
-
message: this.
|
|
18773
|
+
message: this.GetMultilanguageText("UnknownOrInvalidJSONChargeTransparencyFormat"),
|
|
18710
18774
|
exception,
|
|
18711
18775
|
certainty: 0
|
|
18712
18776
|
};
|
|
@@ -18724,14 +18788,14 @@ var Chargy = class {
|
|
|
18724
18788
|
if (IsAPublicKeyLookup(processedFile.result))
|
|
18725
18789
|
return {
|
|
18726
18790
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
18727
|
-
message: this.
|
|
18791
|
+
message: this.GetMultilanguageText("UnknownOrInvalidChargeTransparencyRecord"),
|
|
18728
18792
|
certainty: 0
|
|
18729
18793
|
};
|
|
18730
18794
|
return processedFile.result;
|
|
18731
18795
|
}
|
|
18732
18796
|
return {
|
|
18733
18797
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
18734
|
-
message: this.
|
|
18798
|
+
message: this.GetMultilanguageText("UnknownOrInvalidChargeTransparencyRecord"),
|
|
18735
18799
|
certainty: 0
|
|
18736
18800
|
};
|
|
18737
18801
|
} else if (processedFiles.length > 1) {
|
|
@@ -18805,7 +18869,7 @@ var Chargy = class {
|
|
|
18805
18869
|
}
|
|
18806
18870
|
return {
|
|
18807
18871
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
18808
|
-
message: this.
|
|
18872
|
+
message: this.GetMultilanguageText("No charge transparency records found!"),
|
|
18809
18873
|
certainty: 0
|
|
18810
18874
|
};
|
|
18811
18875
|
}
|
|
@@ -18815,7 +18879,7 @@ var Chargy = class {
|
|
|
18815
18879
|
if (!IsAChargeTransparencyRecord(CTR))
|
|
18816
18880
|
return {
|
|
18817
18881
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
18818
|
-
message: this.
|
|
18882
|
+
message: this.GetMultilanguageText("UnknownOrInvalidJSONChargeTransparencyFormat"),
|
|
18819
18883
|
certainty: 0
|
|
18820
18884
|
};
|
|
18821
18885
|
this.chargingStationOperators = [];
|
|
@@ -18940,7 +19004,7 @@ var Chargy = class {
|
|
|
18940
19004
|
} catch (exception) {
|
|
18941
19005
|
return {
|
|
18942
19006
|
status: "InvalidSessionFormat" /* InvalidSessionFormat */,
|
|
18943
|
-
message: "Exception occured: " + (exception instanceof Error ? exception.message : String(exception)),
|
|
19007
|
+
message: this.GetMultilanguageText("Exception occured: " + (exception instanceof Error ? exception.message : String(exception))),
|
|
18944
19008
|
certainty: 0
|
|
18945
19009
|
};
|
|
18946
19010
|
}
|
|
@@ -19071,7 +19135,7 @@ var Chargy = class {
|
|
|
19071
19135
|
default:
|
|
19072
19136
|
verificationResult2 = {
|
|
19073
19137
|
status: "UnknownSessionFormat" /* UnknownSessionFormat */,
|
|
19074
|
-
message: this.
|
|
19138
|
+
message: this.GetMultilanguageText("UnknownOrInvalidChargingSessionFormat"),
|
|
19075
19139
|
certainty: 0
|
|
19076
19140
|
};
|
|
19077
19141
|
break;
|
|
@@ -19081,7 +19145,7 @@ var Chargy = class {
|
|
|
19081
19145
|
chargingSession.ctr,
|
|
19082
19146
|
{
|
|
19083
19147
|
level: this.getChargingSessionTotalEnergyWarningLevel(),
|
|
19084
|
-
message: this.
|
|
19148
|
+
message: this.GetMultilanguageText("InplausibleTotalEnergyMeasurementWarning")
|
|
19085
19149
|
}
|
|
19086
19150
|
);
|
|
19087
19151
|
return {
|
|
@@ -19147,7 +19211,7 @@ var Chargy = class {
|
|
|
19147
19211
|
};
|
|
19148
19212
|
|
|
19149
19213
|
// src/verificationResults.ts
|
|
19150
|
-
function toSessionVerificationResults(CTR, noRecordsMessage = "No charge transparency records found!") {
|
|
19214
|
+
function toSessionVerificationResults(CTR, noRecordsMessage = { "en": "No charge transparency records found!" }) {
|
|
19151
19215
|
const verificationResults = (CTR.chargingSessions ?? []).map((session) => session.verificationResult).filter(isISessionCryptoResult1);
|
|
19152
19216
|
if (verificationResults.length > 0)
|
|
19153
19217
|
return verificationResults;
|
|
@@ -19171,6 +19235,6 @@ buffer/index.js:
|
|
|
19171
19235
|
*)
|
|
19172
19236
|
*/
|
|
19173
19237
|
|
|
19174
|
-
export { ACrypt, Alfen, AlfenCrypt01, BSMCrypt01, CanonicalJSONError, ChargeIT, ChargePoint, ChargePointCrypt01, IChargeTransparencyLiveLink_exports as ChargeTransparencyLiveLink, ChargeTransparencyLiveLinkContext, IChargeTransparencyRecord_exports as ChargeTransparencyRecord, Chargy, chargyInterfaces_exports as ChargyInterfaces, Clone, CloneCTR, ConcatenateBuffers, CreateDiv, CreateDiv2, CryptoAlgorithms, CryptoHashAlgorithms, DayOfWeek, DisplayPrefixes, EMHCrypt01, GDFCrypt01, IECCurves, IEncoding, InformationRelevance, InformationRelevanceToString, IsAChargeTransparencyLiveLink, IsAChargeTransparencyRecord, IsAPublicKeyInfo, IsAPublicKeyLookup, IsASessionCryptoResult, IsNullOrEmpty, JSONSignatureVerificationStatus, MENNEKES_EDL40_OBIS, MENNEKES_EDL40_XMLNS, Mennekes, MennekesCrypt01, OBIS2Hex, OBIS2MeasurementName, OBIS_RegExpr, OCMF, OCMFTransactionTypes, OCMFv1_x, OCPI, PCDF, PCDFCrypt01, PCDFParseError, PCDFValidationError, PCDF_FIELD_ORDER, PCDF_PREFIX, ParseJSON_LD, PublicKeyFormats, IPublicKeyInfo_exports as PublicKeyInfo, SAFEXML, SessionVerificationResult, SetHex, SetInt8, SetText, SetText_withLength, SetTimestamp, SetTimestamp32, SetUInt32, SetUInt32_withCode, SetUInt64, SetUInt64D, SignMessage, SignatureFormats, TimeStatusTypes, UTC2human, VerificationResult, VerifyJSONMessageSignatures, WarningLevel, WhenNullOrEmpty, XMLContainer, asJSONArray, asJSONObject, asNumber, asString, buf2hex, buildMennekesSignatureData, bytesToHex2 as bytesToHex, canonicalJSONBytes, canonicalJSONStringify, cleanHex, closeFullscreen, createHexString, dateToMennekesLocalEpochSeconds, extractMennekesChargingProcesses, firstKey, firstValue, getDirectChildByLocalName, getDirectChildrenByLocalName, getElementsByLocalName, getInt16Bytes, getInt32Bytes, getInt64Bytes, getInt8Bytes, getTrimmedTextContent, hashFile, hex2bin, hex32, hexToArrayBuffer, hexToBytes, intFromBytes, isGeoLocation, isICryptoResult, isIFileInfo, isIPublicKeyXY, isISessionCryptoResult1, isISessionCryptoResult2, isJSONLDObject, isMandatoryArrayOfStrings, isMandatoryBoolean, isMandatoryDecimal, isMandatoryJSONArray, isMandatoryJSONObject, isMandatoryNumber, isMandatoryString, isMandatoryURL, isMultilanguageText, isOIDInfo, isObject, isOptionalArrayOfStrings, isOptionalDecimal, isOptionalJSONArray, isOptionalJSONArrayError, isOptionalJSONArrayOk, isOptionalJSONObject, isOptionalNumber, isOptionalString, isOptionalURL, isPCDFText, isString, isStringArray, isStringOrOIDInfo, isStringOrStringArray, jsonPrettyPrinter, measurementName2human, normalizePCDFPublicKeyHex, normalizeXMLText, openFullscreen, pad, parseAndVerifyJSONSignatures, parseDescription, parseHexString, parseMennekesXMLDocument, parseNumber, parseOBIS, parsePCDFDocument, parsePCDFPublicKey, parsePCDFSignature, parseUTC, readQRCodeTextFromImage, readQRCodeTextFromImageData, secp224k1, setUILocale, sha256, sha384, sha512, signJSONMessage, signMessage, stripPCDFControlCharacters, time2human, toArrayBuffer, toSessionVerificationResults, toUint8Array, unquotePCDFText, validatePCDFFields, verifyJSONMessageSignatureResults, verifyJSONMessageSignatures, verifyJSONSignature, verifyJSONSignatureResult, verifyPCDFDocument };
|
|
19238
|
+
export { ACrypt, Alfen, AlfenCrypt01, BSMCrypt01, CanonicalJSONError, ChargeIT, ChargePoint, ChargePointCrypt01, IChargeTransparencyLiveLink_exports as ChargeTransparencyLiveLink, ChargeTransparencyLiveLinkContext, IChargeTransparencyRecord_exports as ChargeTransparencyRecord, Chargy, chargyInterfaces_exports as ChargyInterfaces, Clone, CloneCTR, ConcatenateBuffers, CreateDiv, CreateDiv2, CreateError, CryptoAlgorithms, CryptoHashAlgorithms, DayOfWeek, DisplayPrefixes, EMHCrypt01, ErrorLevel, GDFCrypt01, IECCurves, IEncoding, InformationRelevance, InformationRelevanceToString, IsAChargeTransparencyLiveLink, IsAChargeTransparencyRecord, IsAPublicKeyInfo, IsAPublicKeyLookup, IsASessionCryptoResult, IsNullOrEmpty, JSONSignatureVerificationStatus, MENNEKES_EDL40_OBIS, MENNEKES_EDL40_XMLNS, Mennekes, MennekesCrypt01, OBIS2Hex, OBIS2MeasurementName, OBIS_RegExpr, OCMF, OCMFTransactionTypes, OCMFv1_x, OCPI, PCDF, PCDFCrypt01, PCDFParseError, PCDFValidationError, PCDF_FIELD_ORDER, PCDF_PREFIX, ParseJSON_LD, PublicKeyFormats, IPublicKeyInfo_exports as PublicKeyInfo, SAFEXML, SessionVerificationResult, SetHex, SetInt8, SetText, SetText_withLength, SetTimestamp, SetTimestamp32, SetUInt32, SetUInt32_withCode, SetUInt64, SetUInt64D, SignMessage, SignatureFormats, TimeStatusTypes, UTC2human, VerificationResult, VerifyJSONMessageSignatures, WarningLevel, WhenNullOrEmpty, XMLContainer, asJSONArray, asJSONObject, asNumber, asString, buf2hex, buildMennekesSignatureData, bytesToHex2 as bytesToHex, canonicalJSONBytes, canonicalJSONStringify, cleanHex, closeFullscreen, createHexString, dateToMennekesLocalEpochSeconds, extractMennekesChargingProcesses, firstKey, firstValue, getDirectChildByLocalName, getDirectChildrenByLocalName, getElementsByLocalName, getInt16Bytes, getInt32Bytes, getInt64Bytes, getInt8Bytes, getTrimmedTextContent, hashFile, hex2bin, hex32, hexToArrayBuffer, hexToBytes, intFromBytes, isGeoLocation, isICryptoResult, isIFileInfo, isIPublicKeyXY, isISessionCryptoResult1, isISessionCryptoResult2, isJSONLDObject, isMandatoryArrayOfStrings, isMandatoryBoolean, isMandatoryDecimal, isMandatoryJSONArray, isMandatoryJSONObject, isMandatoryNumber, isMandatoryString, isMandatoryURL, isMultilanguageText, isOIDInfo, isObject, isOptionalArrayOfStrings, isOptionalDecimal, isOptionalJSONArray, isOptionalJSONArrayError, isOptionalJSONArrayOk, isOptionalJSONObject, isOptionalNumber, isOptionalString, isOptionalURL, isPCDFText, isString, isStringArray, isStringOrOIDInfo, isStringOrStringArray, jsonPrettyPrinter, measurementName2human, normalizePCDFPublicKeyHex, normalizeXMLText, openFullscreen, pad, parseAndVerifyJSONSignatures, parseDescription, parseHexString, parseMennekesXMLDocument, parseNumber, parseOBIS, parsePCDFDocument, parsePCDFPublicKey, parsePCDFSignature, parseUTC, readQRCodeTextFromImage, readQRCodeTextFromImageData, secp224k1, setUILocale, sha256, sha384, sha512, signJSONMessage, signMessage, stripPCDFControlCharacters, time2human, toArrayBuffer, toSessionVerificationResults, toUint8Array, unquotePCDFText, validatePCDFFields, verifyJSONMessageSignatureResults, verifyJSONMessageSignatures, verifyJSONSignature, verifyJSONSignatureResult, verifyPCDFDocument };
|
|
19175
19239
|
//# sourceMappingURL=index.js.map
|
|
19176
19240
|
//# sourceMappingURL=index.js.map
|