@epilot/app-client 0.12.7 → 0.12.8

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/dist/openapi.d.ts CHANGED
@@ -1519,13 +1519,17 @@ declare namespace Components {
1519
1519
  * Hook that returns runtime metadata describing how a visualization (consumption / price / cost chart) should be rendered for a given portal context (meter, contract, etc). It is invoked by the portal before fetching data, with the same context the data hook would receive, so that the discovery shape can vary per meter/contract. The expected response to the call is:
1520
1520
  * - 200 with a JSON body of shape:
1521
1521
  * {
1522
- * "type_options": [{ "id": "ht", "label": { "en": "High tariff" }, "aggregation_group": "consumption", "unit": "kWh" }, ...],
1523
- * "statistical_method": "sum",
1522
+ * "type_options": [
1523
+ * { "id": "feed-out", "label": { "en": "Grid import" }, "aggregation_group": "grid", "statistical_method": "sum", "direction": "out", "unit": "kWh" },
1524
+ * { "id": "feed-in", "label": { "en": "Feed-in" }, "aggregation_group": "grid", "statistical_method": "sum", "direction": "in", "unit": "kWh" },
1525
+ * ...
1526
+ * ],
1524
1527
  * "intervals": ["PT15M", "PT1H", "P1D", "P1M"],
1525
1528
  * "data_range": { "from": "2024-01-01T00:00:00Z", "to": "2026-05-01T00:00:00Z" }
1526
1529
  * }
1527
- * `statistical_method` describes the statistical method already applied to the data the data hook returns and dictates the chart shape: `sum` is rendered as a bar chart; `min`, `average`, and `max` are rendered as a line chart. Defaults to `sum` when omitted.
1528
- * `aggregation_group` controls how types within a group are visually combined:
1530
+ * Each type option carries its own `statistical_method`, which describes the method already applied to that type's data and dictates the chart shape: `sum` is rendered as a bar chart; `min`, `average`, and `max` are rendered as a line chart. A single visualization can therefore mix bar-shaped types with line-shaped types. Defaults to `sum` when omitted.
1531
+ * `direction` declares whether a type adds to or subtracts from the period total: `out` is grid-to-consumer (consumption, additive); `in` is consumer-to-grid (export, subtractive). With both present in a prosumer setup the chart computes a *net* consumption per period and can flip its label to "Total production" when the result is negative. Defaults to `out` when omitted.
1532
+ * `aggregation_group` controls how types within a group are visually combined (depends on the per-type `statistical_method`):
1529
1533
  * - bar chart (`sum`): same-group types are stacked into a single bar (e.g. ht/nt summed into total consumption); different-group types render side-by-side.
1530
1534
  * - line chart (`min` / `average` / `max`): same-group types are rendered as an area chart; different-group types render as separate lines.
1531
1535
  * All fields are optional; the consumer falls back to its defaults for whatever the hook does not return.
@@ -2040,13 +2044,17 @@ declare namespace Components {
2040
2044
  * Hook that returns runtime metadata describing how a visualization (consumption / price / cost chart) should be rendered for a given portal context (meter, contract, etc). It is invoked by the portal before fetching data, with the same context the data hook would receive, so that the discovery shape can vary per meter/contract. The expected response to the call is:
2041
2045
  * - 200 with a JSON body of shape:
2042
2046
  * {
2043
- * "type_options": [{ "id": "ht", "label": { "en": "High tariff" }, "aggregation_group": "consumption", "unit": "kWh" }, ...],
2044
- * "statistical_method": "sum",
2047
+ * "type_options": [
2048
+ * { "id": "feed-out", "label": { "en": "Grid import" }, "aggregation_group": "grid", "statistical_method": "sum", "direction": "out", "unit": "kWh" },
2049
+ * { "id": "feed-in", "label": { "en": "Feed-in" }, "aggregation_group": "grid", "statistical_method": "sum", "direction": "in", "unit": "kWh" },
2050
+ * ...
2051
+ * ],
2045
2052
  * "intervals": ["PT15M", "PT1H", "P1D", "P1M"],
2046
2053
  * "data_range": { "from": "2024-01-01T00:00:00Z", "to": "2026-05-01T00:00:00Z" }
2047
2054
  * }
2048
- * `statistical_method` describes the statistical method already applied to the data the data hook returns and dictates the chart shape: `sum` is rendered as a bar chart; `min`, `average`, and `max` are rendered as a line chart. Defaults to `sum` when omitted.
2049
- * `aggregation_group` controls how types within a group are visually combined:
2055
+ * Each type option carries its own `statistical_method`, which describes the method already applied to that type's data and dictates the chart shape: `sum` is rendered as a bar chart; `min`, `average`, and `max` are rendered as a line chart. A single visualization can therefore mix bar-shaped types with line-shaped types. Defaults to `sum` when omitted.
2056
+ * `direction` declares whether a type adds to or subtracts from the period total: `out` is grid-to-consumer (consumption, additive); `in` is consumer-to-grid (export, subtractive). With both present in a prosumer setup the chart computes a *net* consumption per period and can flip its label to "Total production" when the result is negative. Defaults to `out` when omitted.
2057
+ * `aggregation_group` controls how types within a group are visually combined (depends on the per-type `statistical_method`):
2050
2058
  * - bar chart (`sum`): same-group types are stacked into a single bar (e.g. ht/nt summed into total consumption); different-group types render side-by-side.
2051
2059
  * - line chart (`min` / `average` / `max`): same-group types are rendered as an area chart; different-group types render as separate lines.
2052
2060
  * All fields are optional; the consumer falls back to its defaults for whatever the hook does not return.
package/dist/openapi.json CHANGED
@@ -3252,7 +3252,7 @@
3252
3252
  "additionalProperties": false
3253
3253
  },
3254
3254
  "PortalExtensionHookVisualizationMetadata": {
3255
- "description": "Hook that returns runtime metadata describing how a visualization (consumption / price / cost chart) should be rendered for a given portal context (meter, contract, etc). It is invoked by the portal before fetching data, with the same context the data hook would receive, so that the discovery shape can vary per meter/contract. The expected response to the call is:\n - 200 with a JSON body of shape:\n {\n \"type_options\": [{ \"id\": \"ht\", \"label\": { \"en\": \"High tariff\" }, \"aggregation_group\": \"consumption\", \"unit\": \"kWh\" }, ...],\n \"statistical_method\": \"sum\",\n \"intervals\": [\"PT15M\", \"PT1H\", \"P1D\", \"P1M\"],\n \"data_range\": { \"from\": \"2024-01-01T00:00:00Z\", \"to\": \"2026-05-01T00:00:00Z\" }\n }\n `statistical_method` describes the statistical method already applied to the data the data hook returns and dictates the chart shape: `sum` is rendered as a bar chart; `min`, `average`, and `max` are rendered as a line chart. Defaults to `sum` when omitted.\n `aggregation_group` controls how types within a group are visually combined:\n - bar chart (`sum`): same-group types are stacked into a single bar (e.g. ht/nt summed into total consumption); different-group types render side-by-side.\n - line chart (`min` / `average` / `max`): same-group types are rendered as an area chart; different-group types render as separate lines.\n All fields are optional; the consumer falls back to its defaults for whatever the hook does not return.\nThe portal looks up this hook implicitly per extension (one `visualizationMetadata` hook per extension) — there is no need for a data-retrieval hook to reference it explicitly.\n",
3255
+ "description": "Hook that returns runtime metadata describing how a visualization (consumption / price / cost chart) should be rendered for a given portal context (meter, contract, etc). It is invoked by the portal before fetching data, with the same context the data hook would receive, so that the discovery shape can vary per meter/contract. The expected response to the call is:\n - 200 with a JSON body of shape:\n {\n \"type_options\": [\n { \"id\": \"feed-out\", \"label\": { \"en\": \"Grid import\" }, \"aggregation_group\": \"grid\", \"statistical_method\": \"sum\", \"direction\": \"out\", \"unit\": \"kWh\" },\n { \"id\": \"feed-in\", \"label\": { \"en\": \"Feed-in\" }, \"aggregation_group\": \"grid\", \"statistical_method\": \"sum\", \"direction\": \"in\", \"unit\": \"kWh\" },\n ...\n ],\n \"intervals\": [\"PT15M\", \"PT1H\", \"P1D\", \"P1M\"],\n \"data_range\": { \"from\": \"2024-01-01T00:00:00Z\", \"to\": \"2026-05-01T00:00:00Z\" }\n }\n Each type option carries its own `statistical_method`, which describes the method already applied to that type's data and dictates the chart shape: `sum` is rendered as a bar chart; `min`, `average`, and `max` are rendered as a line chart. A single visualization can therefore mix bar-shaped types with line-shaped types. Defaults to `sum` when omitted.\n `direction` declares whether a type adds to or subtracts from the period total: `out` is grid-to-consumer (consumption, additive); `in` is consumer-to-grid (export, subtractive). With both present in a prosumer setup the chart computes a *net* consumption per period and can flip its label to \"Total production\" when the result is negative. Defaults to `out` when omitted.\n `aggregation_group` controls how types within a group are visually combined (depends on the per-type `statistical_method`):\n - bar chart (`sum`): same-group types are stacked into a single bar (e.g. ht/nt summed into total consumption); different-group types render side-by-side.\n - line chart (`min` / `average` / `max`): same-group types are rendered as an area chart; different-group types render as separate lines.\n All fields are optional; the consumer falls back to its defaults for whatever the hook does not return.\nThe portal looks up this hook implicitly per extension (one `visualizationMetadata` hook per extension) — there is no need for a data-retrieval hook to reference it explicitly.\n",
3256
3256
  "type": "object",
3257
3257
  "properties": {
3258
3258
  "id": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.12.7",
3
+ "version": "0.12.8",
4
4
  "description": "JavaScript client library for the epilot App API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",