@epilot/app-client 0.12.4 → 0.12.6
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 +142 -85
- package/dist/openapi.json +93 -48
- package/package.json +1 -1
package/dist/openapi.d.ts
CHANGED
|
@@ -1497,11 +1497,11 @@ declare namespace Components {
|
|
|
1497
1497
|
*
|
|
1498
1498
|
*/
|
|
1499
1499
|
PortalExtensionHookConsumptionDataRetrieval | /**
|
|
1500
|
-
*
|
|
1500
|
+
* Generic data export hook. When configured on blocks that support it, the portal delegates the export action (e.g. CSV/Excel/PDF download) to the configured external source instead of generating the file itself. Can be used by any block that supports export — consumption charts, dynamic tariff charts, etc. The expected response to the call is:
|
|
1501
1501
|
* - 200 with a JSON body describing the exported file (download_url, optional filename, content_type, expires_at)
|
|
1502
1502
|
*
|
|
1503
1503
|
*/
|
|
1504
|
-
|
|
1504
|
+
PortalExtensionHookDataExport | /**
|
|
1505
1505
|
* Hook that will allow using the specified source as data for consumption visualizations. This hook is triggered to fetch the data. Format of the request and response has to follow the following specification: TBD. The expected response to the call is:
|
|
1506
1506
|
* - 200 with the time series data
|
|
1507
1507
|
*
|
|
@@ -1515,7 +1515,19 @@ declare namespace Components {
|
|
|
1515
1515
|
* - valid: false
|
|
1516
1516
|
*
|
|
1517
1517
|
*/
|
|
1518
|
-
PortalExtensionHookMeterReadingPlausibilityCheck
|
|
1518
|
+
PortalExtensionHookMeterReadingPlausibilityCheck | /**
|
|
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
|
+
* - 200 with a JSON body of shape:
|
|
1521
|
+
* {
|
|
1522
|
+
* "type_options": [{ "id": "ht", "label": { "en": "High tariff" }, "aggregation_group": "consumption", "unit": "kWh" }, ...],
|
|
1523
|
+
* "intervals": ["PT15M", "PT1H", "P1D", "P1M"],
|
|
1524
|
+
* "data_range": { "from": "2024-01-01T00:00:00Z", "to": "2026-05-01T00:00:00Z" }
|
|
1525
|
+
* }
|
|
1526
|
+
* All fields are optional; the consumer falls back to its defaults for whatever the hook does not return.
|
|
1527
|
+
* The 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.
|
|
1528
|
+
*
|
|
1529
|
+
*/
|
|
1530
|
+
PortalExtensionHookVisualizationMetadata)[];
|
|
1519
1531
|
links?: {
|
|
1520
1532
|
/**
|
|
1521
1533
|
* Identifier of the link. Should not change between updates.
|
|
@@ -1545,16 +1557,6 @@ declare namespace Components {
|
|
|
1545
1557
|
};
|
|
1546
1558
|
}[];
|
|
1547
1559
|
}
|
|
1548
|
-
/**
|
|
1549
|
-
* An aggregation method advertised by a consumption data retrieval hook.
|
|
1550
|
-
*/
|
|
1551
|
-
export interface PortalExtensionHookConsumptionAggregationMethodOption {
|
|
1552
|
-
/**
|
|
1553
|
-
* Identifier of the option. Matches the `aggregation_method` value returned by the hook.
|
|
1554
|
-
*/
|
|
1555
|
-
id: "sum" | "average" | "min" | "max";
|
|
1556
|
-
label: TranslatedString;
|
|
1557
|
-
}
|
|
1558
1560
|
/**
|
|
1559
1561
|
* Hook that will allow using the specified source as data for consumption visualizations. This hook is triggered to fetch the data. Format of the request and response has to follow the following specification: TBD. The expected response to the call is:
|
|
1560
1562
|
* - 200 with the time series data
|
|
@@ -1568,19 +1570,11 @@ declare namespace Components {
|
|
|
1568
1570
|
name?: TranslatedString;
|
|
1569
1571
|
type: "consumptionDataRetrieval";
|
|
1570
1572
|
/**
|
|
1573
|
+
* Deprecated. Prefer declaring a sibling `visualizationMetadata` hook on the same extension and returning `intervals` from its response — that way the supported intervals can vary per meter/contract.
|
|
1571
1574
|
* Intervals supported by the API. If omitted, it is assumed that all intervals are supported.
|
|
1572
|
-
*/
|
|
1573
|
-
intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M")[];
|
|
1574
|
-
/**
|
|
1575
|
-
* Consumption types advertised by the hook (e.g. `ht`/`nt`, `feed-in`/`feed-out`). The `id` has to match the `type` field returned in the consumption response.
|
|
1576
1575
|
*
|
|
1577
1576
|
*/
|
|
1578
|
-
|
|
1579
|
-
/**
|
|
1580
|
-
* Aggregation methods advertised by the hook (e.g. `sum`, `average`, `min`, `max`). The `id` has to match the `aggregation_method` field returned in the consumption response.
|
|
1581
|
-
*
|
|
1582
|
-
*/
|
|
1583
|
-
aggregation_method_options?: /* An aggregation method advertised by a consumption data retrieval hook. */ PortalExtensionHookConsumptionAggregationMethodOption[];
|
|
1577
|
+
intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M")[];
|
|
1584
1578
|
auth?: PortalExtensionAuthBlock;
|
|
1585
1579
|
call: {
|
|
1586
1580
|
/**
|
|
@@ -1624,65 +1618,6 @@ declare namespace Components {
|
|
|
1624
1618
|
use_static_ips?: boolean;
|
|
1625
1619
|
secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
|
|
1626
1620
|
}
|
|
1627
|
-
/**
|
|
1628
|
-
* Hook that takes over the export of consumption data from the portal. When defined, the portal delegates exporting (e.g. CSV/Excel/PDF download) to the configured external source instead of generating the export itself. This hook is triggered when an end user requests a consumption export. The expected response to the call is:
|
|
1629
|
-
* - 200 with a JSON body describing the exported file (download_url, optional filename, content_type, expires_at)
|
|
1630
|
-
*
|
|
1631
|
-
*/
|
|
1632
|
-
export interface PortalExtensionHookConsumptionExport {
|
|
1633
|
-
/**
|
|
1634
|
-
* Identifier of the hook. Should not change between updates.
|
|
1635
|
-
*/
|
|
1636
|
-
id: string; // ^[a-zA-Z0-9_-]+$
|
|
1637
|
-
name?: TranslatedString;
|
|
1638
|
-
type: "consumptionExport";
|
|
1639
|
-
auth?: PortalExtensionAuthBlock;
|
|
1640
|
-
call: {
|
|
1641
|
-
/**
|
|
1642
|
-
* HTTP method to use for the call
|
|
1643
|
-
*/
|
|
1644
|
-
method?: string;
|
|
1645
|
-
/**
|
|
1646
|
-
* URL to call. Supports variable interpolation.
|
|
1647
|
-
*/
|
|
1648
|
-
url: string;
|
|
1649
|
-
/**
|
|
1650
|
-
* Parameters to append to the URL. Supports variable interpolation.
|
|
1651
|
-
*/
|
|
1652
|
-
params?: {
|
|
1653
|
-
[name: string]: string;
|
|
1654
|
-
};
|
|
1655
|
-
/**
|
|
1656
|
-
* Headers to use. Supports variable interpolation.
|
|
1657
|
-
*/
|
|
1658
|
-
headers?: {
|
|
1659
|
-
[name: string]: string;
|
|
1660
|
-
};
|
|
1661
|
-
/**
|
|
1662
|
-
* Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.
|
|
1663
|
-
*/
|
|
1664
|
-
body?: {
|
|
1665
|
-
[name: string]: any;
|
|
1666
|
-
};
|
|
1667
|
-
};
|
|
1668
|
-
/**
|
|
1669
|
-
* Deprecated. Prefer `secure_proxy` instead.
|
|
1670
|
-
* If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.
|
|
1671
|
-
*
|
|
1672
|
-
*/
|
|
1673
|
-
use_static_ips?: boolean;
|
|
1674
|
-
secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
|
|
1675
|
-
}
|
|
1676
|
-
/**
|
|
1677
|
-
* A consumption type advertised by a consumption data retrieval hook.
|
|
1678
|
-
*/
|
|
1679
|
-
export interface PortalExtensionHookConsumptionOption {
|
|
1680
|
-
/**
|
|
1681
|
-
* Identifier of the option. Matches the `type` value returned by the hook (e.g. `ht`, `nt`, `feed-in`).
|
|
1682
|
-
*/
|
|
1683
|
-
id: string;
|
|
1684
|
-
label: TranslatedString;
|
|
1685
|
-
}
|
|
1686
1621
|
/**
|
|
1687
1622
|
* Hook that replaces the built-in Contract identification for self-assignment. This hook involves an HTTP request whenever a user is trying to self-assign Contract(s).
|
|
1688
1623
|
* The expected response http status code to the call is:
|
|
@@ -1780,7 +1715,9 @@ declare namespace Components {
|
|
|
1780
1715
|
name?: TranslatedString;
|
|
1781
1716
|
type: "costDataRetrieval";
|
|
1782
1717
|
/**
|
|
1718
|
+
* Deprecated. Prefer declaring a sibling `visualizationMetadata` hook on the same extension and returning `intervals` from its response — that way the supported intervals can vary per meter/contract.
|
|
1783
1719
|
* Intervals supported by the API. If omitted, it is assumed that all intervals are supported.
|
|
1720
|
+
*
|
|
1784
1721
|
*/
|
|
1785
1722
|
intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M")[];
|
|
1786
1723
|
auth?: PortalExtensionAuthBlock;
|
|
@@ -1826,6 +1763,63 @@ declare namespace Components {
|
|
|
1826
1763
|
use_static_ips?: boolean;
|
|
1827
1764
|
secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
|
|
1828
1765
|
}
|
|
1766
|
+
/**
|
|
1767
|
+
* Generic data export hook. When configured on blocks that support it, the portal delegates the export action (e.g. CSV/Excel/PDF download) to the configured external source instead of generating the file itself. Can be used by any block that supports export — consumption charts, dynamic tariff charts, etc. The expected response to the call is:
|
|
1768
|
+
* - 200 with a JSON body describing the exported file (download_url, optional filename, content_type, expires_at)
|
|
1769
|
+
*
|
|
1770
|
+
*/
|
|
1771
|
+
export interface PortalExtensionHookDataExport {
|
|
1772
|
+
/**
|
|
1773
|
+
* Identifier of the hook. Should not change between updates.
|
|
1774
|
+
*/
|
|
1775
|
+
id: string; // ^[a-zA-Z0-9_-]+$
|
|
1776
|
+
name?: TranslatedString;
|
|
1777
|
+
type: "dataExport";
|
|
1778
|
+
/**
|
|
1779
|
+
* Optional list of portal block types this hook supports. If omitted,
|
|
1780
|
+
* the hook is usable on any export-capable block. Allowed values match
|
|
1781
|
+
* the block type identifiers used by the portal builder
|
|
1782
|
+
* (e.g. `consumption_visualization`, `dynamic_tariff`).
|
|
1783
|
+
*
|
|
1784
|
+
*/
|
|
1785
|
+
block_types?: string[];
|
|
1786
|
+
auth?: PortalExtensionAuthBlock;
|
|
1787
|
+
call: {
|
|
1788
|
+
/**
|
|
1789
|
+
* HTTP method to use for the call
|
|
1790
|
+
*/
|
|
1791
|
+
method?: string;
|
|
1792
|
+
/**
|
|
1793
|
+
* URL to call. Supports variable interpolation.
|
|
1794
|
+
*/
|
|
1795
|
+
url: string;
|
|
1796
|
+
/**
|
|
1797
|
+
* Parameters to append to the URL. Supports variable interpolation.
|
|
1798
|
+
*/
|
|
1799
|
+
params?: {
|
|
1800
|
+
[name: string]: string;
|
|
1801
|
+
};
|
|
1802
|
+
/**
|
|
1803
|
+
* Headers to use. Supports variable interpolation.
|
|
1804
|
+
*/
|
|
1805
|
+
headers?: {
|
|
1806
|
+
[name: string]: string;
|
|
1807
|
+
};
|
|
1808
|
+
/**
|
|
1809
|
+
* Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.
|
|
1810
|
+
*/
|
|
1811
|
+
body?: {
|
|
1812
|
+
[name: string]: any;
|
|
1813
|
+
};
|
|
1814
|
+
};
|
|
1815
|
+
/**
|
|
1816
|
+
* Deprecated. Prefer `secure_proxy` instead.
|
|
1817
|
+
* If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.
|
|
1818
|
+
*
|
|
1819
|
+
*/
|
|
1820
|
+
use_static_ips?: boolean;
|
|
1821
|
+
secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
|
|
1822
|
+
}
|
|
1829
1823
|
/**
|
|
1830
1824
|
* Hook that checks the plausibility of meter readings before they are saved. This hook makes a POST call whenever a user is trying to save a meter reading. The expected response to the call is:
|
|
1831
1825
|
* - 200:
|
|
@@ -1935,7 +1929,9 @@ declare namespace Components {
|
|
|
1935
1929
|
name?: TranslatedString;
|
|
1936
1930
|
type: "priceDataRetrieval";
|
|
1937
1931
|
/**
|
|
1932
|
+
* Deprecated. Prefer declaring a sibling `visualizationMetadata` hook on the same extension and returning `intervals` from its response — that way the supported intervals can vary per meter/contract.
|
|
1938
1933
|
* Intervals supported by the API. If omitted, it is assumed that all intervals are supported.
|
|
1934
|
+
*
|
|
1939
1935
|
*/
|
|
1940
1936
|
intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M")[];
|
|
1941
1937
|
auth?: PortalExtensionAuthBlock;
|
|
@@ -2035,6 +2031,68 @@ declare namespace Components {
|
|
|
2035
2031
|
use_static_ips?: boolean;
|
|
2036
2032
|
secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
|
|
2037
2033
|
}
|
|
2034
|
+
/**
|
|
2035
|
+
* 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:
|
|
2036
|
+
* - 200 with a JSON body of shape:
|
|
2037
|
+
* {
|
|
2038
|
+
* "type_options": [{ "id": "ht", "label": { "en": "High tariff" }, "aggregation_group": "consumption", "unit": "kWh" }, ...],
|
|
2039
|
+
* "intervals": ["PT15M", "PT1H", "P1D", "P1M"],
|
|
2040
|
+
* "data_range": { "from": "2024-01-01T00:00:00Z", "to": "2026-05-01T00:00:00Z" }
|
|
2041
|
+
* }
|
|
2042
|
+
* All fields are optional; the consumer falls back to its defaults for whatever the hook does not return.
|
|
2043
|
+
* The 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.
|
|
2044
|
+
*
|
|
2045
|
+
*/
|
|
2046
|
+
export interface PortalExtensionHookVisualizationMetadata {
|
|
2047
|
+
/**
|
|
2048
|
+
* Identifier of the hook. Should not change between updates.
|
|
2049
|
+
*/
|
|
2050
|
+
id: string; // ^[a-zA-Z0-9_-]+$
|
|
2051
|
+
name?: TranslatedString;
|
|
2052
|
+
type: "visualizationMetadata";
|
|
2053
|
+
auth?: PortalExtensionAuthBlock;
|
|
2054
|
+
call: {
|
|
2055
|
+
/**
|
|
2056
|
+
* HTTP method to use for the call
|
|
2057
|
+
*/
|
|
2058
|
+
method?: string;
|
|
2059
|
+
/**
|
|
2060
|
+
* URL to call. Supports variable interpolation.
|
|
2061
|
+
*/
|
|
2062
|
+
url: string;
|
|
2063
|
+
/**
|
|
2064
|
+
* Parameters to append to the URL. Supports variable interpolation.
|
|
2065
|
+
*/
|
|
2066
|
+
params?: {
|
|
2067
|
+
[name: string]: string;
|
|
2068
|
+
};
|
|
2069
|
+
/**
|
|
2070
|
+
* Headers to use. Supports variable interpolation.
|
|
2071
|
+
*/
|
|
2072
|
+
headers?: {
|
|
2073
|
+
[name: string]: string;
|
|
2074
|
+
};
|
|
2075
|
+
/**
|
|
2076
|
+
* Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.
|
|
2077
|
+
*/
|
|
2078
|
+
body?: {
|
|
2079
|
+
[name: string]: any;
|
|
2080
|
+
};
|
|
2081
|
+
};
|
|
2082
|
+
resolved?: {
|
|
2083
|
+
/**
|
|
2084
|
+
* Optional path to the metadata object in the response. If omitted, the metadata is assumed to be on the top level.
|
|
2085
|
+
*/
|
|
2086
|
+
dataPath?: string;
|
|
2087
|
+
};
|
|
2088
|
+
/**
|
|
2089
|
+
* Deprecated. Prefer `secure_proxy` instead.
|
|
2090
|
+
* If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.
|
|
2091
|
+
*
|
|
2092
|
+
*/
|
|
2093
|
+
use_static_ips?: boolean;
|
|
2094
|
+
secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
|
|
2095
|
+
}
|
|
2038
2096
|
export interface PortalExtensionSeamlessLink {
|
|
2039
2097
|
/**
|
|
2040
2098
|
* Identifier of the link. Should not change between updates.
|
|
@@ -3604,15 +3662,14 @@ export type PortalBlockSurfaceConfig = Components.Schemas.PortalBlockSurfaceConf
|
|
|
3604
3662
|
export type PortalExtensionAuthBlock = Components.Schemas.PortalExtensionAuthBlock;
|
|
3605
3663
|
export type PortalExtensionComponent = Components.Schemas.PortalExtensionComponent;
|
|
3606
3664
|
export type PortalExtensionConfig = Components.Schemas.PortalExtensionConfig;
|
|
3607
|
-
export type PortalExtensionHookConsumptionAggregationMethodOption = Components.Schemas.PortalExtensionHookConsumptionAggregationMethodOption;
|
|
3608
3665
|
export type PortalExtensionHookConsumptionDataRetrieval = Components.Schemas.PortalExtensionHookConsumptionDataRetrieval;
|
|
3609
|
-
export type PortalExtensionHookConsumptionExport = Components.Schemas.PortalExtensionHookConsumptionExport;
|
|
3610
|
-
export type PortalExtensionHookConsumptionOption = Components.Schemas.PortalExtensionHookConsumptionOption;
|
|
3611
3666
|
export type PortalExtensionHookContractIdentification = Components.Schemas.PortalExtensionHookContractIdentification;
|
|
3612
3667
|
export type PortalExtensionHookCostDataRetrieval = Components.Schemas.PortalExtensionHookCostDataRetrieval;
|
|
3668
|
+
export type PortalExtensionHookDataExport = Components.Schemas.PortalExtensionHookDataExport;
|
|
3613
3669
|
export type PortalExtensionHookMeterReadingPlausibilityCheck = Components.Schemas.PortalExtensionHookMeterReadingPlausibilityCheck;
|
|
3614
3670
|
export type PortalExtensionHookPriceDataRetrieval = Components.Schemas.PortalExtensionHookPriceDataRetrieval;
|
|
3615
3671
|
export type PortalExtensionHookRegistrationIdentifiersCheck = Components.Schemas.PortalExtensionHookRegistrationIdentifiersCheck;
|
|
3672
|
+
export type PortalExtensionHookVisualizationMetadata = Components.Schemas.PortalExtensionHookVisualizationMetadata;
|
|
3616
3673
|
export type PortalExtensionSeamlessLink = Components.Schemas.PortalExtensionSeamlessLink;
|
|
3617
3674
|
export type PortalExtensionSecureProxy = Components.Schemas.PortalExtensionSecureProxy;
|
|
3618
3675
|
export type Pricing = Components.Schemas.Pricing;
|
package/dist/openapi.json
CHANGED
|
@@ -2609,9 +2609,10 @@
|
|
|
2609
2609
|
"contractIdentification": "#/components/schemas/PortalExtensionHookContractIdentification",
|
|
2610
2610
|
"priceDataRetrieval": "#/components/schemas/PortalExtensionHookPriceDataRetrieval",
|
|
2611
2611
|
"consumptionDataRetrieval": "#/components/schemas/PortalExtensionHookConsumptionDataRetrieval",
|
|
2612
|
-
"
|
|
2612
|
+
"dataExport": "#/components/schemas/PortalExtensionHookDataExport",
|
|
2613
2613
|
"costDataRetrieval": "#/components/schemas/PortalExtensionHookCostDataRetrieval",
|
|
2614
|
-
"meterReadingPlausibilityCheck": "#/components/schemas/PortalExtensionHookMeterReadingPlausibilityCheck"
|
|
2614
|
+
"meterReadingPlausibilityCheck": "#/components/schemas/PortalExtensionHookMeterReadingPlausibilityCheck",
|
|
2615
|
+
"visualizationMetadata": "#/components/schemas/PortalExtensionHookVisualizationMetadata"
|
|
2615
2616
|
}
|
|
2616
2617
|
},
|
|
2617
2618
|
"oneOf": [
|
|
@@ -2628,13 +2629,16 @@
|
|
|
2628
2629
|
"$ref": "#/components/schemas/PortalExtensionHookConsumptionDataRetrieval"
|
|
2629
2630
|
},
|
|
2630
2631
|
{
|
|
2631
|
-
"$ref": "#/components/schemas/
|
|
2632
|
+
"$ref": "#/components/schemas/PortalExtensionHookDataExport"
|
|
2632
2633
|
},
|
|
2633
2634
|
{
|
|
2634
2635
|
"$ref": "#/components/schemas/PortalExtensionHookCostDataRetrieval"
|
|
2635
2636
|
},
|
|
2636
2637
|
{
|
|
2637
2638
|
"$ref": "#/components/schemas/PortalExtensionHookMeterReadingPlausibilityCheck"
|
|
2639
|
+
},
|
|
2640
|
+
{
|
|
2641
|
+
"$ref": "#/components/schemas/PortalExtensionHookVisualizationMetadata"
|
|
2638
2642
|
}
|
|
2639
2643
|
]
|
|
2640
2644
|
}
|
|
@@ -2981,7 +2985,8 @@
|
|
|
2981
2985
|
},
|
|
2982
2986
|
"intervals": {
|
|
2983
2987
|
"type": "array",
|
|
2984
|
-
"
|
|
2988
|
+
"deprecated": true,
|
|
2989
|
+
"description": "Deprecated. Prefer declaring a sibling `visualizationMetadata` hook on the same extension and returning `intervals` from its response — that way the supported intervals can vary per meter/contract.\nIntervals supported by the API. If omitted, it is assumed that all intervals are supported.\n",
|
|
2985
2990
|
"items": {
|
|
2986
2991
|
"type": "string",
|
|
2987
2992
|
"enum": [
|
|
@@ -3081,7 +3086,8 @@
|
|
|
3081
3086
|
},
|
|
3082
3087
|
"intervals": {
|
|
3083
3088
|
"type": "array",
|
|
3084
|
-
"
|
|
3089
|
+
"deprecated": true,
|
|
3090
|
+
"description": "Deprecated. Prefer declaring a sibling `visualizationMetadata` hook on the same extension and returning `intervals` from its response — that way the supported intervals can vary per meter/contract.\nIntervals supported by the API. If omitted, it is assumed that all intervals are supported.\n",
|
|
3085
3091
|
"items": {
|
|
3086
3092
|
"type": "string",
|
|
3087
3093
|
"enum": [
|
|
@@ -3092,20 +3098,6 @@
|
|
|
3092
3098
|
]
|
|
3093
3099
|
}
|
|
3094
3100
|
},
|
|
3095
|
-
"type_options": {
|
|
3096
|
-
"type": "array",
|
|
3097
|
-
"description": "Consumption types advertised by the hook (e.g. `ht`/`nt`, `feed-in`/`feed-out`). The `id` has to match the `type` field returned in the consumption response.\n",
|
|
3098
|
-
"items": {
|
|
3099
|
-
"$ref": "#/components/schemas/PortalExtensionHookConsumptionOption"
|
|
3100
|
-
}
|
|
3101
|
-
},
|
|
3102
|
-
"aggregation_method_options": {
|
|
3103
|
-
"type": "array",
|
|
3104
|
-
"description": "Aggregation methods advertised by the hook (e.g. `sum`, `average`, `min`, `max`). The `id` has to match the `aggregation_method` field returned in the consumption response.\n",
|
|
3105
|
-
"items": {
|
|
3106
|
-
"$ref": "#/components/schemas/PortalExtensionHookConsumptionAggregationMethodOption"
|
|
3107
|
-
}
|
|
3108
|
-
},
|
|
3109
3101
|
"auth": {
|
|
3110
3102
|
"$ref": "#/components/schemas/PortalExtensionAuthBlock"
|
|
3111
3103
|
},
|
|
@@ -3175,8 +3167,8 @@
|
|
|
3175
3167
|
],
|
|
3176
3168
|
"additionalProperties": false
|
|
3177
3169
|
},
|
|
3178
|
-
"
|
|
3179
|
-
"description": "
|
|
3170
|
+
"PortalExtensionHookDataExport": {
|
|
3171
|
+
"description": "Generic data export hook. When configured on blocks that support it, the portal delegates the export action (e.g. CSV/Excel/PDF download) to the configured external source instead of generating the file itself. Can be used by any block that supports export — consumption charts, dynamic tariff charts, etc. The expected response to the call is:\n - 200 with a JSON body describing the exported file (download_url, optional filename, content_type, expires_at)\n",
|
|
3180
3172
|
"type": "object",
|
|
3181
3173
|
"properties": {
|
|
3182
3174
|
"id": {
|
|
@@ -3190,9 +3182,16 @@
|
|
|
3190
3182
|
"type": {
|
|
3191
3183
|
"type": "string",
|
|
3192
3184
|
"enum": [
|
|
3193
|
-
"
|
|
3185
|
+
"dataExport"
|
|
3194
3186
|
]
|
|
3195
3187
|
},
|
|
3188
|
+
"block_types": {
|
|
3189
|
+
"type": "array",
|
|
3190
|
+
"description": "Optional list of portal block types this hook supports. If omitted,\nthe hook is usable on any export-capable block. Allowed values match\nthe block type identifiers used by the portal builder\n(e.g. `consumption_visualization`, `dynamic_tariff`).\n",
|
|
3191
|
+
"items": {
|
|
3192
|
+
"type": "string"
|
|
3193
|
+
}
|
|
3194
|
+
},
|
|
3196
3195
|
"auth": {
|
|
3197
3196
|
"$ref": "#/components/schemas/PortalExtensionAuthBlock"
|
|
3198
3197
|
},
|
|
@@ -3252,45 +3251,90 @@
|
|
|
3252
3251
|
],
|
|
3253
3252
|
"additionalProperties": false
|
|
3254
3253
|
},
|
|
3255
|
-
"
|
|
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 \"intervals\": [\"PT15M\", \"PT1H\", \"P1D\", \"P1M\"],\n \"data_range\": { \"from\": \"2024-01-01T00:00:00Z\", \"to\": \"2026-05-01T00:00:00Z\" }\n }\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
|
-
"description": "A consumption type advertised by a consumption data retrieval hook.",
|
|
3258
3257
|
"properties": {
|
|
3259
3258
|
"id": {
|
|
3260
3259
|
"type": "string",
|
|
3261
|
-
"
|
|
3260
|
+
"pattern": "^[a-zA-Z0-9_-]+$",
|
|
3261
|
+
"description": "Identifier of the hook. Should not change between updates."
|
|
3262
3262
|
},
|
|
3263
|
-
"
|
|
3263
|
+
"name": {
|
|
3264
3264
|
"$ref": "#/components/schemas/TranslatedString"
|
|
3265
|
-
}
|
|
3266
|
-
|
|
3267
|
-
"required": [
|
|
3268
|
-
"id",
|
|
3269
|
-
"label"
|
|
3270
|
-
],
|
|
3271
|
-
"additionalProperties": false
|
|
3272
|
-
},
|
|
3273
|
-
"PortalExtensionHookConsumptionAggregationMethodOption": {
|
|
3274
|
-
"type": "object",
|
|
3275
|
-
"description": "An aggregation method advertised by a consumption data retrieval hook.",
|
|
3276
|
-
"properties": {
|
|
3277
|
-
"id": {
|
|
3265
|
+
},
|
|
3266
|
+
"type": {
|
|
3278
3267
|
"type": "string",
|
|
3279
3268
|
"enum": [
|
|
3280
|
-
"
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3269
|
+
"visualizationMetadata"
|
|
3270
|
+
]
|
|
3271
|
+
},
|
|
3272
|
+
"auth": {
|
|
3273
|
+
"$ref": "#/components/schemas/PortalExtensionAuthBlock"
|
|
3274
|
+
},
|
|
3275
|
+
"call": {
|
|
3276
|
+
"type": "object",
|
|
3277
|
+
"properties": {
|
|
3278
|
+
"method": {
|
|
3279
|
+
"type": "string",
|
|
3280
|
+
"description": "HTTP method to use for the call",
|
|
3281
|
+
"default": "GET"
|
|
3282
|
+
},
|
|
3283
|
+
"url": {
|
|
3284
|
+
"type": "string",
|
|
3285
|
+
"description": "URL to call. Supports variable interpolation."
|
|
3286
|
+
},
|
|
3287
|
+
"params": {
|
|
3288
|
+
"type": "object",
|
|
3289
|
+
"description": "Parameters to append to the URL. Supports variable interpolation.",
|
|
3290
|
+
"additionalProperties": {
|
|
3291
|
+
"type": "string"
|
|
3292
|
+
},
|
|
3293
|
+
"default": {}
|
|
3294
|
+
},
|
|
3295
|
+
"headers": {
|
|
3296
|
+
"type": "object",
|
|
3297
|
+
"description": "Headers to use. Supports variable interpolation.",
|
|
3298
|
+
"additionalProperties": {
|
|
3299
|
+
"type": "string"
|
|
3300
|
+
},
|
|
3301
|
+
"default": {}
|
|
3302
|
+
},
|
|
3303
|
+
"body": {
|
|
3304
|
+
"type": "object",
|
|
3305
|
+
"description": "Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.",
|
|
3306
|
+
"additionalProperties": true
|
|
3307
|
+
}
|
|
3308
|
+
},
|
|
3309
|
+
"required": [
|
|
3310
|
+
"url"
|
|
3284
3311
|
],
|
|
3285
|
-
"
|
|
3312
|
+
"additionalProperties": false
|
|
3286
3313
|
},
|
|
3287
|
-
"
|
|
3288
|
-
"
|
|
3314
|
+
"resolved": {
|
|
3315
|
+
"type": "object",
|
|
3316
|
+
"properties": {
|
|
3317
|
+
"dataPath": {
|
|
3318
|
+
"type": "string",
|
|
3319
|
+
"description": "Optional path to the metadata object in the response. If omitted, the metadata is assumed to be on the top level."
|
|
3320
|
+
}
|
|
3321
|
+
},
|
|
3322
|
+
"additionalProperties": false
|
|
3323
|
+
},
|
|
3324
|
+
"use_static_ips": {
|
|
3325
|
+
"type": "boolean",
|
|
3326
|
+
"deprecated": true,
|
|
3327
|
+
"description": "Deprecated. Prefer `secure_proxy` instead.\nIf true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.\n",
|
|
3328
|
+
"default": false
|
|
3329
|
+
},
|
|
3330
|
+
"secure_proxy": {
|
|
3331
|
+
"$ref": "#/components/schemas/PortalExtensionSecureProxy"
|
|
3289
3332
|
}
|
|
3290
3333
|
},
|
|
3291
3334
|
"required": [
|
|
3292
3335
|
"id",
|
|
3293
|
-
"
|
|
3336
|
+
"type",
|
|
3337
|
+
"call"
|
|
3294
3338
|
],
|
|
3295
3339
|
"additionalProperties": false
|
|
3296
3340
|
},
|
|
@@ -3314,7 +3358,8 @@
|
|
|
3314
3358
|
},
|
|
3315
3359
|
"intervals": {
|
|
3316
3360
|
"type": "array",
|
|
3317
|
-
"
|
|
3361
|
+
"deprecated": true,
|
|
3362
|
+
"description": "Deprecated. Prefer declaring a sibling `visualizationMetadata` hook on the same extension and returning `intervals` from its response — that way the supported intervals can vary per meter/contract.\nIntervals supported by the API. If omitted, it is assumed that all intervals are supported.\n",
|
|
3318
3363
|
"items": {
|
|
3319
3364
|
"type": "string",
|
|
3320
3365
|
"enum": [
|