@open-charging-cloud/wwcp-poi 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +382 -0
  2. package/README.md +534 -362
  3. package/dist/crypto/ber.d.ts +48 -0
  4. package/dist/crypto/ber.d.ts.map +1 -0
  5. package/dist/crypto/certificates.d.ts +21 -0
  6. package/dist/crypto/certificates.d.ts.map +1 -0
  7. package/dist/crypto/curves.d.ts +25 -0
  8. package/dist/crypto/curves.d.ts.map +1 -0
  9. package/dist/crypto/ecc.d.ts +34 -0
  10. package/dist/crypto/ecc.d.ts.map +1 -0
  11. package/dist/crypto/publicKeys.d.ts +51 -0
  12. package/dist/crypto/publicKeys.d.ts.map +1 -0
  13. package/dist/crypto/rsa.d.ts +30 -0
  14. package/dist/crypto/rsa.d.ts.map +1 -0
  15. package/dist/encoding/text.d.ts +9 -0
  16. package/dist/encoding/text.d.ts.map +1 -1
  17. package/dist/evTaler/amounts.d.ts +89 -0
  18. package/dist/evTaler/amounts.d.ts.map +1 -0
  19. package/dist/evTaler/contractTerms.d.ts +107 -0
  20. package/dist/evTaler/contractTerms.d.ts.map +1 -0
  21. package/dist/evTaler/meterValue.d.ts +65 -0
  22. package/dist/evTaler/meterValue.d.ts.map +1 -0
  23. package/dist/evTaler/payURI.d.ts +28 -0
  24. package/dist/evTaler/payURI.d.ts.map +1 -0
  25. package/dist/evTaler/settlement.d.ts +85 -0
  26. package/dist/evTaler/settlement.d.ts.map +1 -0
  27. package/dist/evTaler/step.d.ts +72 -0
  28. package/dist/evTaler/step.d.ts.map +1 -0
  29. package/dist/history/apply.d.ts +6 -1
  30. package/dist/history/apply.d.ts.map +1 -1
  31. package/dist/history/changeSet.d.ts +18 -2
  32. package/dist/history/changeSet.d.ts.map +1 -1
  33. package/dist/history/checkpoint.d.ts +7 -0
  34. package/dist/history/checkpoint.d.ts.map +1 -1
  35. package/dist/history/commit.d.ts +13 -1
  36. package/dist/history/commit.d.ts.map +1 -1
  37. package/dist/history/elements.d.ts +19 -0
  38. package/dist/history/elements.d.ts.map +1 -0
  39. package/dist/history/epoch.d.ts +2 -0
  40. package/dist/history/epoch.d.ts.map +1 -1
  41. package/dist/history/history.d.ts +46 -6
  42. package/dist/history/history.d.ts.map +1 -1
  43. package/dist/history/preconditions.d.ts +22 -0
  44. package/dist/history/preconditions.d.ts.map +1 -0
  45. package/dist/index.d.ts +18 -4
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +10296 -1558
  48. package/dist/index.js.map +1 -1
  49. package/dist/json/canonical.d.ts.map +1 -1
  50. package/dist/keys.d.ts +2 -0
  51. package/dist/keys.d.ts.map +1 -1
  52. package/dist/network/certificates.d.ts +16 -4
  53. package/dist/network/certificates.d.ts.map +1 -1
  54. package/dist/network/countries.d.ts +16 -0
  55. package/dist/network/countries.d.ts.map +1 -0
  56. package/dist/network/evTaler.d.ts +1 -14
  57. package/dist/network/evTaler.d.ts.map +1 -1
  58. package/dist/network/identifications.d.ts +6 -6
  59. package/dist/network/identifications.d.ts.map +1 -1
  60. package/dist/network/measurementPublicKey.d.ts +7 -0
  61. package/dist/network/measurementPublicKey.d.ts.map +1 -0
  62. package/dist/network/offers.d.ts +53 -0
  63. package/dist/network/offers.d.ts.map +1 -0
  64. package/dist/network/partyKeys.d.ts +8 -5
  65. package/dist/network/partyKeys.d.ts.map +1 -1
  66. package/dist/network/poiJSON.d.ts +172 -0
  67. package/dist/network/poiJSON.d.ts.map +1 -0
  68. package/dist/network/poiValues.d.ts +48 -0
  69. package/dist/network/poiValues.d.ts.map +1 -0
  70. package/dist/network/reading.d.ts +46 -0
  71. package/dist/network/reading.d.ts.map +1 -0
  72. package/dist/network/references.d.ts +36 -0
  73. package/dist/network/references.d.ts.map +1 -0
  74. package/dist/network/roamingNetwork.d.ts +10 -11
  75. package/dist/network/roamingNetwork.d.ts.map +1 -1
  76. package/dist/network/timeZones.d.ts +8 -0
  77. package/dist/network/timeZones.d.ts.map +1 -0
  78. package/dist/network/tree.d.ts +14 -0
  79. package/dist/network/tree.d.ts.map +1 -1
  80. package/dist/network/versionTexts.d.ts +1 -7
  81. package/dist/network/versionTexts.d.ts.map +1 -1
  82. package/dist/network/writtenForm.d.ts.map +1 -1
  83. package/dist/proofs/priceStatement.d.ts.map +1 -1
  84. package/dist/proofs/stationProof.d.ts +2 -0
  85. package/dist/proofs/stationProof.d.ts.map +1 -1
  86. package/dist/proofs/trustContext.d.ts +6 -0
  87. package/dist/proofs/trustContext.d.ts.map +1 -1
  88. package/dist/verifier/chargingStation.d.ts +5 -0
  89. package/dist/verifier/chargingStation.d.ts.map +1 -1
  90. package/dist/verifier/checkpoints.d.ts +6 -0
  91. package/dist/verifier/checkpoints.d.ts.map +1 -1
  92. package/dist/verifier/documentKeys.d.ts +27 -0
  93. package/dist/verifier/documentKeys.d.ts.map +1 -0
  94. package/dist/verifier/historicalMeasurements.d.ts +96 -0
  95. package/dist/verifier/historicalMeasurements.d.ts.map +1 -0
  96. package/dist/verifier/measurementKeys.d.ts +48 -0
  97. package/dist/verifier/measurementKeys.d.ts.map +1 -0
  98. package/dist/verifier/observedVersions.d.ts +70 -0
  99. package/dist/verifier/observedVersions.d.ts.map +1 -0
  100. package/dist/verifier/pricePublication.d.ts +74 -0
  101. package/dist/verifier/pricePublication.d.ts.map +1 -0
  102. package/dist/verifier/sessionPrices.d.ts +75 -0
  103. package/dist/verifier/sessionPrices.d.ts.map +1 -0
  104. package/dist/verifier/trustTransitions.d.ts +67 -0
  105. package/dist/verifier/trustTransitions.d.ts.map +1 -0
  106. package/package.json +15 -14
@@ -1 +1 @@
1
- {"version":3,"file":"canonical.d.ts","sourceRoot":"","sources":["../../src/json/canonical.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,MAA8B,cAAc,CAAC;AAC/D,OAAO,EAAY,KAAK,SAAS,EAAE,MAAa,YAAY,CAAC;AA0B7D,8DAA8D;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,MAAM,CAoB/E"}
package/dist/keys.d.ts CHANGED
@@ -3,8 +3,10 @@ import { type JSONObject, type JSONValue } from './json/value.ts';
3
3
  /** What a signing key may sign (SPECIFICATION.md section 4.1); a signing key naming none signs everything of its party. */
4
4
  export declare const KeyUsages: {
5
5
  readonly Infrastructure: "infrastructure";
6
+ readonly ChargeTransparencyRecords: "chargeTransparencyRecords";
6
7
  readonly Tariffs: "tariffs";
7
8
  readonly PriceStatements: "priceStatements";
9
+ readonly WitnessPublications: "witnessPublications";
8
10
  readonly Models: "models";
9
11
  readonly Software: "software";
10
12
  readonly Certificates: "certificates";
@@ -1 +1 @@
1
- {"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../src/keys.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAK1C,OAAO,EAAgB,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIhF,2HAA2H;AAC3H,eAAO,MAAM,SAAS;;;;;;;;;CASZ,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,OAAO,SAAS,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAKhE,eAAO,MAAM,kBAAkB,QAAiD,CAAC;AAyBjF;;;GAGG;AACH,qBAAa,YAAY;IAGjB,wEAAwE;aACxD,EAAE,EAAU,MAAM;aAClB,GAAG,EAAS,OAAO;IACnC,gFAAgF;aAChE,QAAQ,EAAI,UAAU;aACtB,SAAS,EAAG,MAAM,GAAG,SAAS;aAC9B,QAAQ,EAAI,MAAM,GAAG,SAAS;IAC9C,iHAAiH;aACjG,MAAM,EAAM,MAAM,GAAG,SAAS;aAC9B,MAAM,EAAM,SAAS,MAAM,EAAE;IAC7C,iCAAiC;aACjB,IAAI,EAAQ,UAAU;IAZ1C,OAAO;IAgBP,2FAA2F;IAC3F,IAAW,eAAe,IAAI,MAAM,CAEnC;IAED,iGAAiG;IAC1F,OAAO,CAAC,KAAK,EAAE,QAA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MG;WACW,KAAK,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,EAAE,IAAI,SAAiB,GAAG,YAAY;IA2FtF,0DAA0D;WAC5C,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE;CAiBrF"}
@@ -1,4 +1,6 @@
1
1
  import { type JSONObject } from '../json/value.ts';
2
+ /** The error, when the given timestamp is given, but none `StrictJSON.Date` reads. */
3
+ export declare const invalidInstant: (json: JSONObject, property: string) => string | undefined;
2
4
  /**
3
5
  * The error, when WWCP_POI refuses the given certificate, as `ConformityCertificate.TryParse` reads it, in its words: what
4
6
  * it reads as its arguments, by their path, then what its constructor checks, as an argument of its parameter where it
@@ -6,9 +8,19 @@ import { type JSONObject } from '../json/value.ts';
6
8
  */
7
9
  export declare function invalidCertificate(certificate: JSONObject): string | undefined;
8
10
  /**
9
- * The error, when the given content names a certificate WWCP_POI refuses to read, or a conformity assessment body naming
10
- * them it refuses, as WWCP_POI says it; undefined for none. Body by body, as WWCP_POI reads them: what it reads of the
11
- * body, its certificates, then what its constructor checks.
11
+ * The error, when WWCP_POI refuses the given conformity assessment body as `ConformityAssessmentBody.TryParse` reads its
12
+ * notifiedBodyNumber and notifiedFor, a text and an array of texts; undefined for none. The legislations notified for as the
13
+ * content holds them, in their ordinal order (Achim's decision of 2026-10-29, as D13 decided it for keys): WWCP_POI writes
14
+ * them so, and another order, written again, would be another text than the one hashed. A legislation given twice its
15
+ * constructor refuses.
12
16
  */
13
- export declare function invalidCertificates(content: JSONObject): string | undefined;
17
+ export declare function invalidNotifiedTexts(body: JSONObject): string | undefined;
18
+ /**
19
+ * The error, when WWCP_POI refuses the given conformity assessment body as its constructor checks it, in its words and
20
+ * order: a notifiedBodyNumber not of four digits, a legislation it is notified for empty or given twice (with case), a
21
+ * certificate issued under a legislation it is not notified for (exactly as written), its certificates in the ordinal order
22
+ * of their identifications. Legislations notified for in another order WWCP_POI writes in their ordinal order; they are
23
+ * taken here as given.
24
+ */
25
+ export declare function invalidBody(body: JSONObject): string | undefined;
14
26
  //# sourceMappingURL=certificates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"certificates.d.ts","sourceRoot":"","sources":["../../src/network/certificates.ts"],"names":[],"mappings":"AAkBA,OAAO,EAA0B,KAAK,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AA6U3F;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAE9E;AAsED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAe3E"}
1
+ {"version":3,"file":"certificates.d.ts","sourceRoot":"","sources":["../../src/network/certificates.ts"],"names":[],"mappings":"AAkBA,OAAO,EAA0B,KAAK,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAwF3F,sFAAsF;AACtF,eAAO,MAAM,cAAc,GAAI,MAAM,UAAU,EAAE,UAAU,MAAM,KAAG,MAAM,GAAG,SAK5E,CAAC;AA+OF;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAE9E;AAKD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAkBzE;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAuChE"}
@@ -0,0 +1,16 @@
1
+ /** A country of Styx. */
2
+ export interface Country {
3
+ readonly alpha2: string;
4
+ readonly alpha3: string;
5
+ readonly numeric: number;
6
+ readonly calling: number;
7
+ readonly names: readonly string[];
8
+ }
9
+ /** The ISO 3166-1 alpha-2 codes of the countries, as `Country.TryParseAlpha2Code` takes them, in upper case. */
10
+ export declare const COUNTRIES: ReadonlySet<string>;
11
+ /**
12
+ * The country a text names as `Country.TryParse` reads it: by its alpha-2 code, its alpha-3 code, both ignoring case, its
13
+ * numeric code, its calling code, or one of its names as written, e.g. `DE`, `deu`, `276`, `49` or `Deutschland`.
14
+ */
15
+ export declare function countryOf(text: string): Country | undefined;
16
+ //# sourceMappingURL=countries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"countries.d.ts","sourceRoot":"","sources":["../../src/network/countries.ts"],"names":[],"mappings":"AAwRA,yBAAyB;AACzB,MAAM,WAAW,OAAO;IACpB,QAAQ,CAAC,MAAM,EAAI,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAI,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAG,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAK,SAAS,MAAM,EAAE,CAAC;CACxC;AAuBD,gHAAgH;AAChH,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,MAAM,CAA+C,CAAC;AAM1F;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAU3D"}
@@ -1,4 +1,4 @@
1
- import { type JSONObject, type JSONValue } from '../json/value.ts';
1
+ import { type JSONValue } from '../json/value.ts';
2
2
  import { type I18NText } from '../qidigital/json.ts';
3
3
  export declare const EV_TALER_MERCHANT_CONTEXT: string;
4
4
  export declare const EV_TALER_EXCHANGE_CONTEXT: string;
@@ -46,19 +46,6 @@ export declare function hermodURL(given: string): HermodURL | undefined;
46
46
  export declare function evTalerMerchantOf(value: JSONValue): EVTalerMerchant | string;
47
47
  /** Whether the given payment options, as `PaymentOptions` compares them without case, name EVTaler. */
48
48
  export declare const namesEVTaler: (paymentOptions: JSONValue | undefined) => boolean;
49
- /**
50
- * The error, as WWCP_POI words it when it reads a version, when a charging station operator of the given content names an
51
- * EV Taler merchant it does not read, a charging pool or charging pool template of it payment options it does not read, or
52
- * the payment option EVTaler without a merchant; undefined for none. Each operator in its order, as WWCP_POI reads it: its
53
- * merchant, its charging pools, its charging pool templates, then the operator made of them.
54
- */
55
- export declare function invalidEVTaler(content: JSONObject): string | undefined;
56
- /**
57
- * The error, as WWCP_POI words it after the last change of a change set, when a charging station operator names the
58
- * payment option EVTaler without an EV Taler merchant: the operators in the ordinal order of their identifications, so
59
- * that a change set may add the merchant and the payment option in either order.
60
- */
61
- export declare const evTalerWithoutMerchant: (content: JSONObject) => string | undefined;
62
49
  /** The payment option as drivers see it at an EVSE whose EV Taler tariff is in its currency, in the languages of its name. */
63
50
  export declare const paymentOptionName: (exchange: EVTalerExchange) => I18NText;
64
51
  //# sourceMappingURL=evTaler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"evTaler.d.ts","sourceRoot":"","sources":["../../src/network/evTaler.ts"],"names":[],"mappings":"AAmBA,OAAO,EAA0B,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC3F,OAAO,EAAwB,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAc3E,eAAO,MAAM,yBAAyB,QAAwD,CAAC;AAC/F,eAAO,MAAM,yBAAyB,QAAwD,CAAC;AAE/F,6GAA6G;AAC7G,eAAO,MAAM,uBAAuB,YAAe,CAAC;AACpD,eAAO,MAAM,sBAAsB,aAAiB,CAAC;AAmBrD,0HAA0H;AAC1H,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,eAAe,EAAG,MAAM,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAW,MAAM,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAU,MAAM,CAAC;IAClC,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,EAAc,QAAQ,CAAC;CACvC;AAED,6HAA6H;AAC7H,MAAM,WAAW,eAAe;IAC5B,QAAQ,CAAC,eAAe,EAAK,MAAM,CAAC;IACpC,QAAQ,CAAC,iBAAiB,EAAG,MAAM,CAAC;IACpC,iFAAiF;IACjF,QAAQ,C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kD,CAAC"}
@@ -6,16 +6,16 @@ import { type JSONObject } from '../json/value.ts';
6
6
  export declare const inRoamingNetwork: (error: string, parameter: string) => string;
7
7
  /** A text as `StringComparison.OrdinalIgnoreCase` compares it: every character by its simple upper case. */
8
8
  export declare const ignoringCase: (text: string) => string;
9
+ /**
10
+ * Whether the given identification is one of its owner, as `IsIdentifiedUnder` of WWCP_POI checks it (4.1): the
11
+ * identification of the owner, a colon and a name without one, the prefix compared without case, as both are.
12
+ */
13
+ export declare const isIdentifiedUnder: (id: string, ownerId: string) => boolean;
9
14
  /**
10
15
  * The energy meters of the given charging station operators and grid operators (`AllEnergyMeters`): of their charging pools,
11
16
  * charging stations and EVSEs, and of their grid connection points.
12
17
  */
13
18
  export declare function energyMetersOf(operators: readonly JSONObject[], gridOperators: readonly JSONObject[]): JSONObject[];
14
- /**
15
- * The error, when an entity of the given content names no identification, or one of another JSON type WWCP_POI3 refuses,
16
- * as it says it; undefined for none. Its parties in the order it reads them, each before what it holds.
17
- */
18
- export declare function invalidIdentification(content: JSONObject): string | undefined;
19
19
  /**
20
20
  * The error, when the given content names an identification twice that WWCP_POI keeps unique within the roaming network,
21
21
  * as WWCP_POI says it of a version, or after the last change of a change set; undefined for none. Of a version, it refuses
@@ -23,5 +23,5 @@ export declare function invalidIdentification(content: JSONObject): string | und
23
23
  * TryParse names: "The given JSON representation of a roaming network is invalid: … (Parameter 'GridOperators')". After the
24
24
  * last change of a change set, it names them bare, in the order it checks them there (RoamingNetwork.ChangeSets.cs).
25
25
  */
26
- export declare function duplicateIdentification(content: JSONObject, of: 'version' | 'change set'): string | undefined;
26
+ export declare function duplicateIdentification(content: JSONObject, of: 'version' | 'change set', kind?: string): string | undefined;
27
27
  //# sourceMappingURL=identifications.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"identifications.d.ts","sourceRoot":"","sources":["../../src/network/identifications.ts"],"names":[],"mappings":"AAiBA,OAAO,EAA0B,KAAK,UAAU,EAAkB,MAAM,kBAAkB,C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AAS,CAwD5H"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The error, as `MeasurementPublicKey.TryCheck` of WWCP_POI3 words it, when a measurement public key is no DER encoded
3
+ * SubjectPublicKeyInfo of a key BouncyCastle makes, or its certificates are no DER encoded certificates, the first of the key,
4
+ * each one issued by the next one; undefined for none.
5
+ */
6
+ export declare function measurementKeyError(key: Uint8Array, chain: readonly Uint8Array[]): string | undefined;
7
+ //# sourceMappingURL=measurementPublicKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measurementPublicKey.d.ts","sourceRoot":"","sources":["../../src/network/measurementPublicKey.ts"],"names":[],"mappings":"AAsBA;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,GAAG,SAAS,CAkDrG"}
@@ -0,0 +1,53 @@
1
+ import { type JSONObject } from '../json/value.ts';
2
+ /** A time zone: the offset of its local time from UTC at a point in time, in minutes. */
3
+ export interface TimeZone {
4
+ readonly name: string;
5
+ readonly offsetAt: (ms: number) => number;
6
+ }
7
+ export declare const UTC: TimeZone;
8
+ /**
9
+ * The time zone of the given name as `POITimeZones.TryFind` finds it: one of a charging pool or a charging pool template,
10
+ * which reading it found this platform to know (`knownTimeZone`); UTC for none.
11
+ */
12
+ export declare function timeZoneNamed(name: string | undefined): TimeZone;
13
+ type Period = readonly [bigint, bigint];
14
+ /** Opening times as `ImmutableOpeningTimes` of Styx holds them. */
15
+ interface OpeningTimes {
16
+ /** Whether it has no regular openings: it is open at any time (`IsOpen24Hours`). */
17
+ readonly always: boolean;
18
+ readonly json: JSONObject;
19
+ readonly openings: readonly Period[];
20
+ readonly closings: readonly Period[];
21
+ }
22
+ /** What a charging tariff offer tells of when and to which sessions it applies. */
23
+ export interface Offer {
24
+ readonly id: string;
25
+ readonly key: string;
26
+ readonly adHoc: boolean;
27
+ readonly contract: boolean;
28
+ readonly providers: ReadonlySet<string>;
29
+ readonly notBefore: bigint | undefined;
30
+ readonly notAfter: bigint | undefined;
31
+ readonly times: OpeningTimes | undefined;
32
+ }
33
+ /** A charging tariff offer as WWCP_POI3 read it. */
34
+ export declare function offerOf(json: JSONObject): Offer;
35
+ /**
36
+ * Whether the given offers apply to some of the same sessions (`SessionsOverlap`): both to ad hoc sessions, or both to
37
+ * sessions with a contract of a provider both name, or one of them names none.
38
+ */
39
+ export declare function sessionsOverlap(offer1: Offer, offer2: Offer): boolean;
40
+ /**
41
+ * Whether the given offers apply at some of the same times at an EVSE in the given time zone (`TimesOverlap`): some time
42
+ * within both their notBefore and notAfter, both inclusive, at which both their opening times are open. The boundaries of
43
+ * the exceptional periods split the common times into stretches; a stretch of more than eight days, also one without an
44
+ * end, is compared by the minutes of a week, a shorter one by its days.
45
+ */
46
+ export declare function timesOverlap(offer1: Offer, offer2: Offer, zone: TimeZone): boolean;
47
+ /**
48
+ * The first of the given EVSEs both offers cover, by the ordinal order of their texts, in whose time zone the offers apply
49
+ * at some of the same times (`FirstOverlap`); undefined for none. The times are compared once per time zone.
50
+ */
51
+ export declare function firstOverlap(offer1: Offer, offer2: Offer, evses: ReadonlyMap<string, string>, timeZoneOf: (key: string) => TimeZone): string | undefined;
52
+ export {};
53
+ //# sourceMappingURL=offers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"offers.d.ts","sourceRoot":"","sources":["../../src/network/offers.ts"],"names":[],"mappings":"AAiBA,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AA2B3E,yFAAyF;AACzF,MAAM,WAAW,QAAQ;IACrB,QAAQ,CAAC,IAAI,EAAO,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAG,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,CAAC;CAC9C;AAED,eAAO,MAAM,GAAG,EAAE,QAA6C,CAAC;AAYhE;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,G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E,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG,SAAS,CAqBxJ"}
@@ -5,15 +5,18 @@ export interface PartyKeys {
5
5
  readonly signingKeys: readonly POIPublicKey[];
6
6
  readonly identityKeys: readonly POIPublicKey[];
7
7
  }
8
+ /** Reads the keys of the given party as `POIPartyKeys.TryParse` does: each key it does not read refused, in its words. */
9
+ export declare function readPartyKeys(party: JSONObject): PartyKeys | string;
10
+ /**
11
+ * The error of the given keys of the given party, e.g. "the charging station operator 'DE*GEF'", as the constructor of the
12
+ * party refuses them (`POIPartyKeys.Check`): a key given twice, a key both a signing and an identity key, an identity key
13
+ * naming usages.
14
+ */
15
+ export declare function checkPartyKeys(keys: PartyKeys, name: string): string | undefined;
8
16
  /**
9
17
  * Reads the keys of the given party, e.g. "the charging station operator 'DE*GEF'", of the given kind, e.g. "a charging
10
18
  * station operator", and refuses them as WWCP_POI3 does, in its words: a key it does not read; then, as the constructor of
11
19
  * the party does, a key given twice, a key both a signing and an identity key, an identity key naming usages.
12
20
  */
13
21
  export declare function partyKeysOf(party: JSONObject, name: string, kind: string): PartyKeys;
14
- /**
15
- * The error, when a party of the given content has keys WWCP_POI3 refuses, as it says it, of the first party it reads;
16
- * undefined for none. The keys of the roaming network operator are read with it (`RoamingNetworkOperator.parse`).
17
- */
18
- export declare function invalidPartyKeys(content: JSONObject): string | undefined;
19
22
  //# sourceMappingURL=partyKeys.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"partyKeys.d.ts","sourceRoot":"","sources":["../../src/network/partyKeys.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAkC,KAAK,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAInG,OAAO,EAAE,YAAY,EAAE,MAAO,YAAY,CAAC;AA2B3C,2BAA2B;AAC3B,MAAM,WAAW,SAAS;IACtB,QAAQ,CAAC,WAAW,EAAI,SAAS,YAAY,EAAE,CAAC;IAChD,QAAQ,CAAC,YAAY,EAAG,SAAS,YAAY,EAAE,CAAC;CACnD;AA+BD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CA6BpF;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAwBxE"}
1
+ {"version":3,"file":"partyKeys.d.ts","sourceRoot":"","sources":["../../src/network/partyKeys.ts"],"names":[],"mappings":"AAiBA,OAAO,EAA0B,KAAK,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAI3F,OAAO,EAAE,YAAY,EAAE,MAAO,YAAY,CAAC;AAe3C,2BAA2B;AAC3B,MAAM,WAAW,SAAS;IACtB,QAAQ,CAAC,WAAW,EAAI,SAAS,YAAY,EAAE,CAAC;IAChD,QAAQ,CAAC,YAAY,EAAG,SAAS,YAAY,EAAE,CAAC;CACnD;AA+BD,0HAA0H;AAC1H,wBAAgB,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,MAAM,CAWnE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAuBhF;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,CAcpF"}
@@ -0,0 +1,172 @@
1
+ import { Decimal } from '../json/decimal.ts';
2
+ import { type JSONObject, type JSONValue } from '../json/value.ts';
3
+ import { type HermodURL } from './evTaler.ts';
4
+ /** What C# throws while it reads an entity: an `ArgumentException` of a constructor, or an exception of Newtonsoft. */
5
+ export declare class Thrown extends Error {
6
+ }
7
+ /** An `ArgumentException`, with its parameter as .NET names it in its message. */
8
+ export declare const thrown: (message: string, parameter?: string) => Thrown;
9
+ /** An error a reader gives back, instead of the value it read. */
10
+ export declare class Refused {
11
+ readonly error: string;
12
+ constructor(error: string);
13
+ }
14
+ /** The error of a reader, or undefined where it read the value. */
15
+ export type Checked = string | undefined;
16
+ /** The first error of the given steps, in their order. */
17
+ export declare function first(...steps: readonly (() => Checked)[]): Checked;
18
+ /** The first error of the given step for each of the given items, in their order. */
19
+ export declare function firstOf<T>(items: readonly T[], step: (item: T) => Checked): Checked;
20
+ /** The given step, where C# catches what it throws and names it so: "The given JSON representation of an EVSE is invalid: …". */
21
+ export declare function caught(what: string, step: () => Checked): Checked;
22
+ /** The error a value a reader gave back is, or undefined. */
23
+ export declare const errorOf: (value: unknown) => Checked;
24
+ export declare const objectsOf: (value: JSONValue | undefined) => JSONObject[];
25
+ /** A value interpolated in a message (`$"'{token}'"`): a text as it is, null as nothing, an object or an array indented. */
26
+ export declare const interpolated: (value: JSONValue) => string;
27
+ /** A value as `ToString(Formatting.None)` writes it, e.g. the element of an array in a message. */
28
+ export declare const compact: (value: JSONValue) => string;
29
+ /** Whether Newtonsoft reads the given value as an integer (`JTokenType.Integer`). */
30
+ export declare const isIntegerToken: (value: JSONValue | undefined) => boolean;
31
+ /**
32
+ * The text of a value as `JToken.Value<String>()` gives it: a text as it is, a number as written invariantly, a boolean as
33
+ * `True` or `False`, null as none; it throws for an object, an array and an integer beyond Int64.
34
+ */
35
+ export declare function valueText(value: JSONValue): string | null;
36
+ /**
37
+ * A text as `Decimal.TryParse(…, NumberStyles.Any, CultureInfo.InvariantCulture)` reads it: whitespace around it, a sign
38
+ * before or after it, parentheses for a negative one, thousands separated by commas, a decimal point, an exponent and the
39
+ * currency sign ¤. Undefined for what it refuses; a text it reads, but this library can not hold as a decimal, e.g. of more
40
+ * than 28 decimal places, which it rounds, is read as none at all, so that nothing it takes is refused.
41
+ */
42
+ export declare function decimalOfText(text: string): Decimal | 'unknown' | undefined;
43
+ /** An optional decimal, as Styx `ParseOptional(…, out Decimal?)` reads it, also a Watt, a Volt or an Ampere: null is none. */
44
+ export declare function optionalDecimal(json: JSONObject, property: string, description: string): Decimal | undefined | Refused;
45
+ /** A mandatory decimal, as Styx `ParseMandatory(…, out Decimal)` reads it. */
46
+ export declare function mandatoryDecimal(json: JSONObject, property: string, description: string): Decimal | undefined | Refused;
47
+ /** An optional boolean, as Styx `ParseOptional(…, out Boolean?)` reads it: also a number, or a text `Boolean.Parse` takes. */
48
+ export declare function optionalBoolean(json: JSONObject, property: string, description: string): Checked;
49
+ /** A decimal not negative (`POIJSON.TryParseNonNegative`, `TryParseSeconds`). */
50
+ export declare function nonNegative(json: JSONObject, property: string, description: string): Decimal | undefined | Refused;
51
+ /** An integer as `POIJSON.TryParseInteger` reads it: an Int32; it throws for an integer beyond Int64. */
52
+ export declare function optionalInteger(json: JSONObject, property: string, description: string): number | undefined | Refused;
53
+ /** The sign of a decimal: -1, 0 or 1. */
54
+ export declare const signOf: (value: Decimal) => number;
55
+ /** An identification, as Styx `ParseMandatory(…, TryParser)` reads it: its text trimmed, read by the given parser. */
56
+ export declare function mandatoryId<T>(json: JSONObject, property: string, description: string, parser: (text: string) => T | undefined): T | Refused;
57
+ /** A text in languages, as Styx `ParseOptionalJSON` reads it (`POIJSON.TryParseI18N`): null is none, an object any. */
58
+ export declare function i18n(json: JSONObject, property: string): Checked;
59
+ /**
60
+ * The languages of a text in languages as `ImmutableI18NString.TryParse` of Styx keeps them: every text of a language, written
61
+ * in any case, also by its number; the rest left out without a word.
62
+ */
63
+ export declare function languagesOf(value: JSONValue | undefined): string[];
64
+ /** An optional text as `POIJSON.TryParseString` reads it: as it is, also empty. */
65
+ export declare function text(json: JSONObject, property: string, description: string): Checked;
66
+ /** An optional text as Styx `ParseOptional(…, out String?)` reads it: null is none, a number or a boolean its text. */
67
+ export declare function styxText(json: JSONObject, property: string, description: string): Checked;
68
+ /** An optional value given as a text, read by the given parser (`POIJSON.TryParseText`). */
69
+ export declare function parsedText<T>(json: JSONObject, property: string, description: string, parser: (text: string) => T | undefined): T | undefined | Refused;
70
+ /** The error of an optional value given as a text, read by the given parser (`POIJSON.TryParseText`). */
71
+ export declare const textError: (json: JSONObject, property: string, description: string, parser: (text: string) => unknown) => Checked;
72
+ /** Identifications or other values given as texts, read by the given parser (`POIJSON.TryParseIds`). */
73
+ export declare function ids<T>(json: JSONObject, property: string, description: string, parser: (text: string) => T | undefined): T[] | Refused;
74
+ /** Values of an enumeration of flags by their exact names (`POIJSON.TryParseFlags`). */
75
+ export declare function flags(json: JSONObject, property: string, description: string, names: readonly string[]): Checked;
76
+ /** A value of an enumeration by its exact name (`POIJSON.TryParseEnum`). */
77
+ export declare function enumeration(json: JSONObject, property: string, description: string, names: readonly string[]): Checked;
78
+ /** Texts as `POIJSON.TryParseStrings` reads them: as they are, in their order. */
79
+ export declare function texts(json: JSONObject, property: string, description: string): string[] | Refused;
80
+ /** Objects read by the given reader (`POIJSON.TryParseObjects`): an error of one named with it. */
81
+ export declare function objects(json: JSONObject, property: string, description: string, reader: (item: JSONObject) => Checked): Checked;
82
+ /** An object read by the given reader (`POIJSON.TryParseObject`). */
83
+ export declare function object(json: JSONObject, property: string, description: string, reader: (item: JSONObject) => Checked): Checked;
84
+ /** The children of an entity given completely, each read by the given reader, its error as it is (`POIJSON.TryParseChildren`). */
85
+ export declare function children(json: JSONObject, property: string, idsProperty: string, description: string, reader: (child: JSONObject) => Checked): Checked;
86
+ /** The JSON-LD context of an entity: none, or the one of its kind, exactly. */
87
+ export declare const context: (json: JSONObject, expected: string, message: string) => Checked;
88
+ /** The JSON-LD context of a kind of entity of a roaming network, e.g. `chargingPool`. */
89
+ export declare const contextOf: (kind: string) => string;
90
+ /** The error, when an entity names another JSON-LD context than the one of its kind, as WWCP_POI3 names it with its id. */
91
+ export declare const entityContext: (json: JSONObject, kind: string, what: string, id: string) => Checked;
92
+ /**
93
+ * A point in time as `DateTimeOffset.TryParse(…, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal)` reads it, as
94
+ * far as this library tells it: a date, a date and a time in the forms of ISO 8601 with a T, a space or a lower case t, an
95
+ * optional fraction of a second, a time zone or none for UTC, whitespace around it; the milliseconds since 1970, floored.
96
+ * .NET takes more, e.g. `10/27/2026` or `27 Oct 2026`, which this library refuses: the written form refuses them anyway.
97
+ */
98
+ export declare function timestampOf(given: string): number | undefined;
99
+ /**
100
+ * A point in time as `timestampOf` reads it, in ticks of 100 ns since 1970, as a `DateTimeOffset` holds it: its fraction
101
+ * of a second rounded to seven digits.
102
+ */
103
+ export declare function ticksOf(given: string): bigint | undefined;
104
+ /** A point in time as `POIEntityMetadata.TryParseTimestamp` reads it, of the given description, e.g. "creation timestamp". */
105
+ export declare function timestamp(json: JSONObject, property: string, description: string): number | undefined | Refused;
106
+ /** The timestamps and the custom data of an entity (`POIEntityMetadata.TryParse`): created, then lastChange, then custom data. */
107
+ export declare function metadata(json: JSONObject): Checked;
108
+ /** The custom data of what has no timestamps (`POIEntityMetadata.TryParse(JSON, out CustomData, …)`). */
109
+ export declare function withoutTimestamps(json: JSONObject): Checked;
110
+ /** A URL as Hermod reads it (`URL.TryParse`). */
111
+ export declare const url: (text: string) => HermodURL | undefined;
112
+ /** A phone number as Styx reads it (`PhoneNumber.TryParse`): five digits, spaces, dashes or slashes in a row, somewhere. */
113
+ export declare const phoneNumber: (given: string) => string | undefined;
114
+ /** An e-mail address as Hermod reads it (`EMailAddress.Parse`): a user and a domain, a name before it in angle brackets. */
115
+ export declare function eMailAddress(given: string): string | undefined;
116
+ /** An optional e-mail address (`POIJSON.TryParseEMailAddress`). */
117
+ export declare function eMailAddressError(json: JSONObject, property: string, description: string): Checked;
118
+ /** A text not empty once trimmed, trimmed: the identifications WWCP_POI takes as free texts. */
119
+ export declare const nonEmpty: (text: string) => string | undefined;
120
+ /** A text not empty, without whitespace around it, as it is: HardwareRevision, FirmwareVersion, SerialNumber. */
121
+ export declare const exactText: (text: string) => string | undefined;
122
+ /** The ISO 4217 codes of the currencies of Styx, as `Currency.TryParseISO` takes them, trimmed, with case. */
123
+ export declare const CURRENCIES: Set<string>;
124
+ /** A currency as `Currency.TryParseISO` reads it. */
125
+ export declare const currency: (text: string) => string | undefined;
126
+ /** An identification as its C# type reads it: its text (`ToString`) and the key its `Equals` compares. */
127
+ export interface Id {
128
+ readonly text: string;
129
+ readonly key: string;
130
+ }
131
+ /** An identification of a free text: trimmed, compared without case, e.g. `EnergyMeter_Id`. */
132
+ export declare const freeId: (given: string) => Id | undefined;
133
+ /** An identification of a free text compared with case, e.g. `ParkingProduct_Id`. */
134
+ export declare const caseId: (given: string) => Id | undefined;
135
+ /** The identification of a charging station operator (`ChargingStationOperator_Id`), e.g. `DE*GEF`. */
136
+ export declare const operatorId: (given: string) => Id | undefined;
137
+ /** The identification of an e-mobility provider (`EMobilityProvider_Id`): its separator kept, compared without it. */
138
+ export declare const providerId: (given: string) => Id | undefined;
139
+ /** The identification of a grid operator (`GridOperator_Id`), as one of a charging station operator. */
140
+ export declare const gridOperatorId: (given: string) => Id | undefined;
141
+ export declare const poolId: (given: string) => Id | undefined;
142
+ export declare const stationId: (given: string) => Id | undefined;
143
+ export declare const evseId: (given: string) => Id | undefined;
144
+ /** The identification of a charging tariff (`ChargingTariff_Id`): trimmed, compared without case and the stars of its suffix. */
145
+ export declare const tariffId: (given: string) => Id | undefined;
146
+ export declare const evseTemplateId: (given: string) => Id | undefined;
147
+ export declare const stationTemplateId: (given: string) => Id | undefined;
148
+ export declare const poolTemplateId: (given: string) => Id | undefined;
149
+ export declare const tariffTemplateId: (given: string) => Id | undefined;
150
+ export declare const tariffGroupId: (given: string) => Id | undefined;
151
+ export declare const evseGroupId: (given: string) => Id | undefined;
152
+ export declare const stationGroupId: (given: string) => Id | undefined;
153
+ export declare const poolGroupId: (given: string) => Id | undefined;
154
+ /** The operator of an identification of a member, a template or a group, e.g. `DE*GEF` of `DE*GEF*E1*1`. */
155
+ export declare const operatorOf: (id: Id) => string;
156
+ /** The identifications of the given kind the given texts are, as their type reads them; those it refuses left out. */
157
+ export declare const idsOf: (values: JSONValue | undefined, parser: (text: string) => Id | undefined) => Id[];
158
+ /** The identification of the given kind of an entity, as its type reads it; undefined for none. */
159
+ export declare const idOf: (entity: JSONObject, parser: (text: string) => Id | undefined, property?: string) => Id | undefined;
160
+ /** The first of the given identifications given before, by the key of its type (`POIJSON.OrderedIds`, `UniqueIds`). */
161
+ export declare function twice<T extends {
162
+ readonly key: string;
163
+ }>(items: readonly T[]): T | undefined;
164
+ /** The error of `POIJSON.OrderedIds`, `UniqueIds` and `Distinct`, of the given description, e.g. "A facility of the charging pool 'X'". */
165
+ export declare const givenTwice: (items: readonly {
166
+ readonly key: string;
167
+ }[], description: string) => Thrown | undefined;
168
+ /** Throws the given exception, if any. */
169
+ export declare function raise(error: Thrown | undefined): void;
170
+ /** Texts compared as their type compares them, e.g. without case. */
171
+ export declare const keyed: (values: readonly string[], key?: (text: string) => string) => Id[];
172
+ //# sourceMappingURL=poiJSON.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"poiJSON.d.ts","sourceRoot":"","sources":["../../src/network/poiJSON.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,MAAsB,oBAAoB,CAAC;AAC7D,OAAO,EAA+C,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAGhH,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAYzD,uHAAuH;AACvH,qBAAa,MAAO,SAAQ,KAAK;CAAG;AAEpC,kFAAkF;AAClF,eAAO,MAAM,MAAM,GAAI,SAAS,MAAM,EAAE,YAAY,MAAM,KAAG,MAC8B,CAAC;AAE5F,kEAAkE;AAClE,qBAAa,OAAO;aACY,KAAK,EAAE,MAAM;gBAAb,KAAK,EAAE,MAAM;CAC5C;AAED,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAEzC,0DAA0D;AAC1D,wBAAgB,KAAK,CAAC,GAAG,KAAK,EAA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AAC;AAEF,uHAAuH;AACvH,wBAAgB,KAAK,CAAC,CAAC,SAAS;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,GAAG,CAAC,GAAG,SAAS,CAQ5F;AAED,2IAA2I;AAC3I,eAAO,MAAM,UAAU,GAAI,OAAO,SAAS;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,aAAa,MAAM,KAAG,MAAM,GAAG,SACJ,CAAC;AAEnG,0CAA0C;AAC1C,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAGrD;AAED,qEAAqE;AACrE,eAAO,MAAM,KAAK,GAAI,QAAQ,SAAS,MAAM,EAAE,EAAE,MAAK,CAAC,IAAI,EAAE,MAAM,KAAK,MAAqB,KAAG,EAAE,EACvC,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { Decimal } from '../json/decimal.ts';
2
+ import { type JSONObject, type JSONValue } from '../json/value.ts';
3
+ import { Refused, type Checked } from './poiJSON.ts';
4
+ /** An optional address (`POIJSON.TryParseAddress`). */
5
+ export declare function addressError(json: JSONObject, property: string, description: string): Checked;
6
+ /**
7
+ * A number of a geo location as `JToken.Value<Double>()` reads it: a number, a boolean, or a text `Double.Parse` takes,
8
+ * thousands separated by commas; its error otherwise, as .NET words it.
9
+ */
10
+ export declare function doubleOf(value: JSONValue): number | Refused;
11
+ /** An optional geo location (`POIJSON.TryParseGeoLocation`), e.g. "geo location". */
12
+ export declare function geoLocationError(json: JSONObject, property: string, description: string): Checked;
13
+ /** The data licenses of an entity (`POIDataLicenses.TryParse`): given completely, then by their identifications, each once. */
14
+ export declare function dataLicenses(json: JSONObject): Checked;
15
+ /** The contact of a party (`POIJSON.TryParseContact`), in its order. */
16
+ export declare const contact: (json: JSONObject) => Checked;
17
+ /** An image as `Image.TryParse` of WWCP_POI2 reads it. */
18
+ export declare const image: (json: JSONObject) => Checked;
19
+ /** An hour and a minute as `HourMin.TryParse` of Styx reads them, e.g. `08:00`; [ hour, minute ] or undefined. */
20
+ export declare function hourMin(given: string): readonly [number, number] | undefined;
21
+ export declare const hhmm: ([hour, minute]: readonly [number, number]) => string;
22
+ /** Opening times as `OpeningTimes.TryParse` of Styx reads them; what its constructors throw named by it once more. */
23
+ export declare function openingTimes(json: JSONObject): Checked;
24
+ /** An energy mix as `EnergyMix.TryParse` of WWCP_POI2 reads it: its error without a word of its own. */
25
+ export declare function energyMix(json: JSONObject): Checked;
26
+ /** A brand as `Brand.TryParse` reads it: with its name. */
27
+ export declare const brand: (json: JSONObject) => Checked;
28
+ /** The brands of an entity (`POIJSON.TryParseChildren` of `brands`). */
29
+ export declare const brands: (json: JSONObject) => Checked;
30
+ /**
31
+ * A key of measurements as `MeasurementPublicKey.TryParse` reads it: its identification the SHA-256 of its key, in Base64.
32
+ * Whether it is a SubjectPublicKeyInfo in DER and its certificate chain one of it WWCP_POI3 tells with BouncyCastle, in its
33
+ * words, which this library leaves to it.
34
+ */
35
+ export declare function measurementPublicKey(json: JSONObject): Checked;
36
+ /** A transparency software assignment as `TransparencySoftwareAssignment.TryParse` reads it: a release and its legal status. */
37
+ export declare const transparencySoftwareAssignment: (json: JSONObject) => Checked;
38
+ /** An authentication mode as `AuthenticationMode.TryParse` reads it: of a type, the cards and brands of RFID. */
39
+ export declare function authenticationMode(json: JSONObject): Checked;
40
+ /** Values given by their exact names (`POIJSON.TryParseIds` with `POIJSON.TryParseName`). */
41
+ export declare const idsByName: (json: JSONObject, property: string, description: string, names: readonly string[]) => string[] | Refused;
42
+ /** A related location as `AdditionalGeoLocation.TryParse` reads it: a geo location and a name. */
43
+ export declare const relatedLocation: (json: JSONObject) => Checked;
44
+ /** A decimal as Styx reads it, compared: whether the given one is below zero. */
45
+ export declare const negative: (value: Decimal | undefined | Refused) => boolean;
46
+ /** The texts of an entity's array of the given property, as they are. */
47
+ export declare const textsAt: (json: JSONObject, property: string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AgB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAsCnD;AAyBD,2DAA2D;AAC3D,eAAO,MAAM,KAAK,GAAI,MAAM,UAAU,KAAG,OAgBnC,CAAC;AAEP,wEAAwE;AACxE,eAAO,MAAM,MAAM,GAAI,MAAM,UAAU,KAAG,OACe,CAAC;AAqB1D;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAkB9D;AAuDD,gIAAgI;AAChI,eAAO,MAAM,8BAA8B,GAAI,MAAM,UAAU,KAAG,OAO7C,CAAC;AAEtB,iHAAiH;AACjH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CA4D5D;AAED,6FAA6F;AAC7F,eAAO,MAAM,SAAS,GAAI,MAAM,UAAU,EAAE,UAAU,MAAM,EAAE,aAAa,MAAM,EAAE,OAAO,SAAS,MAAM,EAAE,KAAG,MAAM,EAAE,GAAG,OAQxH,CAAC;AAEF,kGAAkG;AAClG,eAAO,MAAM,eAAe,GAAI,MAAM,UAAU,KAAG,OAIoD,CAAC;AAExG,iFAAiF;AACjF,eAAO,MAAM,QAAQ,GAAI,OAAO,OAAO,GAAG,SAAS,GAAG,OAAO,KAAG,OACb,CAAC;AAEpD,yEAAyE;AACzE,eAAO,MAAM,OAAO,GAAI,MAAM,UAAU,EAAE,UAAU,MAAM,KAAG,MAAM,EAGlE,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { type JSONObject } from '../json/value.ts';
2
+ import { Thrown, type Checked, type Id } from './poiJSON.ts';
3
+ /** An energy meter as `EnergyMeter.TryParse` reads it, also one of a grid connection point. */
4
+ export declare const energyMeter: (json: JSONObject) => Checked;
5
+ /** The energy meter an EVSE or a grid connection point embeds (`EnergyMeter.TryParseOne`). */
6
+ export declare function embeddedEnergyMeter(json: JSONObject): Checked;
7
+ /** An energy meter template as `EnergyMeterTemplate.TryParse` reads it. */
8
+ export declare const energyMeterTemplate: (json: JSONObject) => Checked;
9
+ /** The energy meter templates and groups of a charging station operator or a grid operator. */
10
+ export declare const energyMeterTemplates: (json: JSONObject) => Checked;
11
+ export declare const energyMeterGroups: (json: JSONObject) => Checked;
12
+ /**
13
+ * The error, when the maximum power of a charging station exceeds the one of all its EVSEs together, each naming its own;
14
+ * the decimals as .NET writes them, here invariantly (WWCP_POI3 in the culture of its machine).
15
+ */
16
+ export declare function powerSumError(station: JSONObject, evses: readonly JSONObject[], id: string): Thrown | undefined;
17
+ /** An element of a tariff as `ChargingTariffElement.TryParse` reads it: price components, at least one, and restrictions. */
18
+ export declare function tariffElement(json: JSONObject): Checked;
19
+ export declare const chargingTariff: (json: JSONObject) => Checked;
20
+ export declare const chargingTariffTemplate: (json: JSONObject) => Checked;
21
+ /** A charging tariff offer as `ChargingTariffOffer.TryParse` reads it, of a charging station operator or an e-mobility provider. */
22
+ export declare const chargingTariffOffer: (json: JSONObject) => Checked;
23
+ /** A parking space, of a parking operator or of a charging station operator, as `ParkingSpace.TryParse` reads it. */
24
+ export declare const parkingSpace: (json: JSONObject) => Checked;
25
+ /** A party as `POIPartyId.ToString` names it: "the ChargingStationOperator 'DE*GEF'". */
26
+ export declare const partyText: (party: JSONObject) => string;
27
+ /** Entities in the ordinal order of their identifications, as their POICollection holds them. */
28
+ export declare const sorted: (entities: readonly JSONObject[]) => JSONObject[];
29
+ /** Identifications in the ordinal order of their texts. */
30
+ export declare const sortedIds: (list: readonly Id[]) => Id[];
31
+ /** What the roaming network reads of itself before its operator (RoamingNetwork.TryParse): its texts, its metadata, its licenses. */
32
+ export declare const invalidNetworkProperties: (content: JSONObject) => Checked;
33
+ /**
34
+ * What the roaming network operator reads of itself (RoamingNetworkOperator.TryParse), besides its keys, its key statement
35
+ * and the certificates of its signing keys, which `RoamingNetworkOperator.parse` reads: its texts and its contact, before its
36
+ * keys; its metadata, after them.
37
+ */
38
+ export declare const invalidOperatorTexts: (json: JSONObject) => Checked;
39
+ export declare const invalidOperatorMetadata: (json: JSONObject) => Checked;
40
+ /**
41
+ * The error, when WWCP_POI3 refuses a party of the given content as it reads it, in its order: the charging station
42
+ * manufacturers, e-mobility providers, grid operators, parking operators, transparency software manufacturers, conformity
43
+ * assessment bodies and energy meter manufacturers, then the charging station operators; undefined for none.
44
+ */
45
+ export declare function invalidReading(content: JSONObject, of?: 'version' | 'change set'): Checked;
46
+ //# sourceMappingURL=reading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reading.d.ts","sourceRoot":"","sources":["../../src/network/reading.ts"],"names":[],"mappings":"AAmBA,OAAO,EAA4C,KAAK,UAAU,EAAkB,MAAM,kBAAkB,CAAC;AAC7G,OAAO,EAK+E,MAAM,EACrD,KAAK,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,cAAc,CAAC;AAkHnF,+FAA+F;AAC/F,eAAO,MAAM,WAAW,GAAI,MAAM,UAAU,KAAG,OAsCzC,CAAC;AAEP,8FAA8F;AAC9F,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAK7D;AAMD,2EAA2E;AAC3E,eAAO,MAAM,mBAAmB,GAAI,MAAM,UAAU,KAAG,OAiCjD,CAAC;AAgDP,+FAA+F;AAC/F,eAAO,MAAM,oBAAoB,GAAI,MAAM,UAAU,KAAG,OAC2D,CAAC;AAEpH,eAAO,MAAM,iBAAiB,GAAI,MAAM,UAAU,KAAG,OAC2D,CAAC;AAoNjH;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,UAAU,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAoB/G;AAqeD,6HAA6H;AAC7H,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CA8BvD;AAsFD,eAAO,MAAM,cAAc,SAvCkB,UAAU,KAAG,OAuCN,CAAC;AACrD,eAAO,MAAM,sBAAsB,SAxCU,UAAU,KAAG,OAwCP,CAAC;AAiEpD,oIAAoI;AACpI,eAAO,MAAM,mBAAmB,GAAI,MAAM,UAAU,KAAG,OAqDjD,CAAC;AAMP,qHAAqH;AACrH,eAAO,MAAM,YAAY,GAAI,MAAM,UAAU,KAAG,OA0D1C,CAAC;AAyqBP,yFAAyF;AACzF,eAAO,MAAM,SAAS,GAAI,OAAO,UAAU,KAAG,MAG+B,CAAC;AA4D9E,iGAAiG;AACjG,eAAO,MAAM,MAAM,GAAI,UAAU,SAAS,UAAU,EAAE,KAAG,UAAU,EAChC,CAAC;AAEpC,2DAA2D;AAC3D,eAAO,MAAM,SAAS,GAAI,MAAM,SAAS,EAAE,EAAE,KAAG,EAAE,EACiD,CAAC;AAyJpG,qIAAqI;AACrI,eAAO,MAAM,wBAAwB,GAAI,SAAS,UAAU,KAAG,OAKtC,CAAC;AAE1B;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,MAAM,UAAU,KAAG,OAQoB,CAAC;AAE7E,eAAO,MAAM,uBAAuB,GAAI,MAAM,UAAU,KAAG,OACzC,CAAC;AAEnB;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,GAAE,SAAS,GAAG,YAAwB,GAAG,OAAO,CA2CrG"}
@@ -0,0 +1,36 @@
1
+ import { type JSONObject } from '../json/value.ts';
2
+ import { type Checked } from './poiJSON.ts';
3
+ /**
4
+ * The given check of the network or of an operator, remembering what it found within it: nothing of a check before, as the
5
+ * content may be changed between two checks, e.g. by a change set, and nothing after it.
6
+ */
7
+ export declare function whileChecking<T>(check: () => T): T;
8
+ /**
9
+ * The error, as WWCP_POI3 words it after the last change of a change set, when a group of a charging station operator
10
+ * names a member it does not have, or an offer a group it does not have (`InvalidGroupOrOffer`), or a charging pool or a
11
+ * charging pool template of it the payment option EVTaler without an EV Taler merchant (`InvalidPaymentOption`), or two of
12
+ * its charging tariff offers overlap at an EVSE (`OverlappingOffers`).
13
+ */
14
+ export declare const invalidGroupOrOffer: (operator: JSONObject) => string | undefined;
15
+ /** The error, when a charging pool or a charging pool template names the payment option EVTaler, but its operator has no merchant. */
16
+ export declare const invalidPaymentOption: (operator: JSONObject) => string | undefined;
17
+ /**
18
+ * What the constructor of a charging station operator of the given identification refuses of what it read, thrown as WWCP_POI3
19
+ * throws it, in its order: charging pools and charging tariffs of another operator or given twice, tariffs of EVSEs and
20
+ * connectors unknown; groups and templates given twice or of another operator, tariffs and templates they name unknown;
21
+ * offers given twice or naming another operator; tariffs without a currency or elements, also of their templates; stations
22
+ * whose templates give them more power than their EVSEs have; members of groups and groups of offers unknown; the payment
23
+ * option EVTaler without a merchant. Of a version only: after a change set, WWCP_POI3 checks its groups, offers and payment
24
+ * options after the last change (`invalidGroupOrOffer`).
25
+ */
26
+ export declare function operatorConstruction(operator: JSONObject, id: string, of: 'version' | 'change set'): void;
27
+ /** What the constructor of the given charging station operator refuses, as its TryParse names it; undefined for nothing. */
28
+ export declare function checkOperator(operator: JSONObject, id: string, of?: 'version' | 'change set'): Checked;
29
+ /**
30
+ * The error, when the constructor of the roaming network refuses the parties of the given content, as WWCP_POI3 words it of a
31
+ * version, in its order, each as an argument of its parameter, or bare after the last change of a change set, in the order it
32
+ * checks them there; undefined for none. After a change set, a reference the version before the given one resolves names
33
+ * what the change set withdrew while another party still names it.
34
+ */
35
+ export declare const invalidReferences: (content: JSONObject, of: "version" | "change set", before?: JSONObject) => string | undefined;
36
+ //# sourceMappingURL=references.d.ts.map