@epilot/app-client 0.16.0 → 0.17.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.
@@ -1 +1 @@
1
- (()=>{"use strict";var e={438(e,r,t){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(t(466));r.default=o.default},466(e){e.exports=JSON.parse('{"openapi":"3.1.0","info":{"title":"","version":""},"servers":[{"url":"https://app.sls.epilot.io"}],"paths":{"/v1/public/app/{appId}/components/{componentId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration to install"},{"name":"componentId","in":"path","required":true,"description":"ID of the component to retrieve"}],"get":{"operationId":"getPublicFacingComponent","responses":{}}},"/v1/app-configurations":{"get":{"operationId":"listConfigurations","parameters":[{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}},"post":{"operationId":"createConfiguration","requestBody":{"$ref":"#/components/requestBodies/CreateConfigRequest"},"responses":{}}},"/v1/app-configurations/public":{"get":{"operationId":"listPublicConfigurations","parameters":[{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app-configurations/public/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration to install"}],"get":{"operationId":"getPublicConfiguration","parameters":[{"name":"version","in":"query"}],"responses":{}}},"/v1/app-configurations/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"get":{"operationId":"getConfiguration","parameters":[{"name":"version","in":"query"}],"responses":{}},"patch":{"operationId":"patchMetadata","requestBody":{"$ref":"#/components/requestBodies/PatchConfigMetadataRequest"},"responses":{}},"delete":{"operationId":"deleteConfiguration","responses":{}}},"/v1/app-configurations/{appId}/events":{"post":{"operationId":"queryEvents","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/app-configurations/{appId}/bundle":{"post":{"operationId":"createBundleUploadUrl","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/CreateBundlePresignedRequest"},"responses":{}}},"/v1/app-configurations/{appId}/zip":{"post":{"operationId":"createZipUploadUrl","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/app-configurations/{appId}/logo":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"post":{"operationId":"createLogoUploadUrl","requestBody":{"$ref":"#/components/requestBodies/CreateLogoPresignedRequest"},"responses":{}},"delete":{"operationId":"deleteLogo","responses":{}}},"/v1/app-configurations/{appId}/versions":{"get":{"operationId":"listVersions","parameters":[{"name":"appId","in":"path","required":true},{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app-configurations/{appId}/versions/{version}":{"get":{"operationId":"getVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}},"delete":{"operationId":"deleteVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}},"patch":{"operationId":"patchVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/PatchVersionRequest"},"responses":{}}},"/v1/app-configurations/{appId}/versions/{version}/review":{"get":{"operationId":"getReview","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}},"post":{"operationId":"createReview","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/CreateReviewRequest"},"responses":{}}},"/v1/app-configurations/{appId}/versions/{version}/components":{"post":{"operationId":"createComponent","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/UpsertComponentRequest"},"responses":{}}},"/v1/app-configurations/{appId}/versions/{version}/components/{componentId}":{"patch":{"operationId":"patchComponent","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true},{"name":"componentId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/UpsertComponentRequest"},"responses":{}},"delete":{"operationId":"deleteComponent","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true},{"name":"componentId","in":"path","required":true}],"responses":{}}},"/v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}":{"post":{"operationId":"cloneVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"sourceVersion","in":"path","required":true},{"name":"targetVersion","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/CloneVersionRequest"},"responses":{}}},"/v1/app":{"get":{"operationId":"listInstallations","parameters":[{"name":"componentType","in":"query"},{"name":"enabled","in":"query"},{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app/{appId}":{"get":{"operationId":"getInstallation","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}},"post":{"operationId":"install","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/InstallRequest"},"responses":{}},"patch":{"operationId":"patchInstallation","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/InstallRequest"},"responses":{}},"delete":{"operationId":"uninstall","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}}},"/v1/app/{appId}/promote-to/{version}":{"post":{"operationId":"promoteVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}}},"/v1/app/{appId}/options/resolve":{"post":{"operationId":"resolveOptions","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/app-events":{"post":{"operationId":"ingestEvent","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/app/{appId}/proxy/{proxyName}/{path}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the installed app"},{"name":"proxyName","in":"path","required":true,"description":"Name of the proxy target as defined in the app manifest"},{"name":"path","in":"path","required":true,"description":"Path to forward to the proxy target"},{"name":"query","in":"query","required":false,"style":"form","explode":true,"description":"Free-form query parameters, forwarded unchanged to the proxy target"}],"get":{"operationId":"publicProxyGet","responses":{}},"post":{"operationId":"publicProxyPost","requestBody":{"content":{"application/json":{}}},"responses":{}},"put":{"operationId":"publicProxyPut","requestBody":{"content":{"application/json":{}}},"responses":{}},"patch":{"operationId":"publicProxyPatch","requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"publicProxyDelete","responses":{}}}},"components":{"requestBodies":{"CreateReviewRequest":{"required":true,"content":{"application/json":{}}},"CreateLogoPresignedRequest":{"required":true,"content":{"application/json":{}}},"CreateBundlePresignedRequest":{"required":true,"content":{"application/json":{}}},"PatchConfigMetadataRequest":{"required":true,"content":{"application/json":{}}},"PatchVersionRequest":{"required":true,"content":{"application/json":{}}},"CloneVersionRequest":{"required":false,"content":{"application/json":{}}},"UpsertComponentRequest":{"required":true,"content":{"application/json":{}}},"CreateConfigRequest":{"required":true,"content":{"application/json":{}}},"InstallRequest":{"content":{"application/json":{}}}}}}')}},r={},t=function t(n){var o=r[n];if(void 0!==o)return o.exports;var p=r[n]={exports:{}};return e[n].call(p.exports,p,p.exports,t),p.exports}(438),n=exports;for(var o in t)n[o]=t[o];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={438(e,r,t){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(t(466));r.default=o.default},466(e){e.exports=JSON.parse('{"openapi":"3.1.0","info":{"title":"","version":""},"servers":[{"url":"https://app.sls.epilot.io"}],"paths":{"/v1/public/app/{appId}/components/{componentId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration to install"},{"name":"componentId","in":"path","required":true,"description":"ID of the component to retrieve"}],"get":{"operationId":"getPublicFacingComponent","responses":{}}},"/v1/app-configurations":{"get":{"operationId":"listConfigurations","parameters":[{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}},"post":{"operationId":"createConfiguration","requestBody":{"$ref":"#/components/requestBodies/CreateConfigRequest"},"responses":{}}},"/v1/app-configurations/public":{"get":{"operationId":"listPublicConfigurations","parameters":[{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app-configurations/public/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration to install"}],"get":{"operationId":"getPublicConfiguration","parameters":[{"name":"version","in":"query"}],"responses":{}}},"/v1/app-configurations/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"get":{"operationId":"getConfiguration","parameters":[{"name":"version","in":"query"}],"responses":{}},"patch":{"operationId":"patchMetadata","requestBody":{"$ref":"#/components/requestBodies/PatchConfigMetadataRequest"},"responses":{}},"delete":{"operationId":"deleteConfiguration","responses":{}}},"/v1/app-configurations/{appId}/events":{"post":{"operationId":"queryEvents","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/app-configurations/{appId}/bundle":{"post":{"operationId":"createBundleUploadUrl","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/CreateBundlePresignedRequest"},"responses":{}}},"/v1/app-configurations/{appId}/zip":{"post":{"operationId":"createZipUploadUrl","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/app-configurations/{appId}/logo":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"post":{"operationId":"createLogoUploadUrl","requestBody":{"$ref":"#/components/requestBodies/CreateLogoPresignedRequest"},"responses":{}},"delete":{"operationId":"deleteLogo","responses":{}}},"/v1/app-configurations/{appId}/versions":{"get":{"operationId":"listVersions","parameters":[{"name":"appId","in":"path","required":true},{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app-configurations/{appId}/versions/{version}":{"get":{"operationId":"getVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}},"delete":{"operationId":"deleteVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}},"patch":{"operationId":"patchVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/PatchVersionRequest"},"responses":{}}},"/v1/app-configurations/{appId}/versions/{version}/review":{"get":{"operationId":"getReview","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}},"post":{"operationId":"createReview","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/CreateReviewRequest"},"responses":{}}},"/v1/app-configurations/{appId}/versions/{version}/components":{"post":{"operationId":"createComponent","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/UpsertComponentRequest"},"responses":{}}},"/v1/app-configurations/{appId}/versions/{version}/components/{componentId}":{"patch":{"operationId":"patchComponent","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true},{"name":"componentId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/UpsertComponentRequest"},"responses":{}},"delete":{"operationId":"deleteComponent","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true},{"name":"componentId","in":"path","required":true}],"responses":{}}},"/v1/app-configurations/{appId}/versions/{sourceVersion}/clone-to/{targetVersion}":{"post":{"operationId":"cloneVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"sourceVersion","in":"path","required":true},{"name":"targetVersion","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/CloneVersionRequest"},"responses":{}}},"/v1/app":{"get":{"operationId":"listInstallations","parameters":[{"name":"componentType","in":"query"},{"name":"enabled","in":"query"},{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}}},"/v1/app/{appId}":{"get":{"operationId":"getInstallation","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}},"post":{"operationId":"install","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/InstallRequest"},"responses":{}},"patch":{"operationId":"patchInstallation","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/InstallRequest"},"responses":{}},"delete":{"operationId":"uninstall","parameters":[{"name":"appId","in":"path","required":true}],"responses":{}}},"/v1/app/{appId}/promote-to/{version}":{"post":{"operationId":"promoteVersion","parameters":[{"name":"appId","in":"path","required":true},{"name":"version","in":"path","required":true}],"responses":{}}},"/v1/app/{appId}/options/resolve":{"post":{"operationId":"resolveOptions","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"content":{"application/json":{}}},"responses":{}}},"/v1/app-events":{"post":{"operationId":"ingestEvent","requestBody":{"required":true,"content":{"application/json":{}}},"responses":{}}},"/v1/public/app/{appId}/proxy/{proxyName}/{path}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the installed app"},{"name":"proxyName","in":"path","required":true,"description":"Name of the proxy target as defined in the app manifest"},{"name":"path","in":"path","required":true,"description":"Path to forward to the proxy target"},{"name":"query","in":"query","required":false,"style":"form","explode":true,"description":"Free-form query parameters, forwarded unchanged to the proxy target"}],"get":{"operationId":"publicProxyGet","responses":{}},"post":{"operationId":"publicProxyPost","requestBody":{"content":{"application/json":{}}},"responses":{}},"put":{"operationId":"publicProxyPut","requestBody":{"content":{"application/json":{}}},"responses":{}},"patch":{"operationId":"publicProxyPatch","requestBody":{"content":{"application/json":{}}},"responses":{}},"delete":{"operationId":"publicProxyDelete","responses":{}}}},"components":{"requestBodies":{"CreateReviewRequest":{"required":true,"content":{"application/json":{}}},"CreateLogoPresignedRequest":{"required":true,"content":{"application/json":{}}},"CreateBundlePresignedRequest":{"required":true,"content":{"application/json":{}}},"PatchConfigMetadataRequest":{"required":true,"content":{"application/json":{}}},"PatchVersionRequest":{"required":true,"content":{"application/json":{}}},"CloneVersionRequest":{"required":false,"content":{"application/json":{}}},"UpsertComponentRequest":{"required":true,"content":{"application/json":{}}},"CreateConfigRequest":{"required":true,"content":{"application/json":{}}},"InstallRequest":{"required":true,"content":{"application/json":{}}}}}}')}},r={},t=function t(n){var o=r[n];if(void 0!==o)return o.exports;var p=r[n]={exports:{}};return e[n].call(p.exports,p,p.exports,t),p.exports}(438),n=exports;for(var o in t)n[o]=t[o];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
@@ -166,6 +166,7 @@
166
166
  }
167
167
  ],
168
168
  "requestBody": {
169
+ "required": true,
169
170
  "content": {
170
171
  "application/json": {}
171
172
  }
@@ -640,6 +641,7 @@
640
641
  }
641
642
  },
642
643
  "InstallRequest": {
644
+ "required": true,
643
645
  "content": {
644
646
  "application/json": {}
645
647
  }
package/dist/openapi.d.ts CHANGED
@@ -1390,10 +1390,6 @@ declare namespace Components {
1390
1390
  */
1391
1391
  key?: string;
1392
1392
  };
1393
- /**
1394
- * If set, requests are sent from epilot's static egress IPs. Mutually exclusive with secure_proxy.
1395
- */
1396
- use_static_ips?: boolean;
1397
1393
  secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
1398
1394
  }
1399
1395
  /**
@@ -1471,7 +1467,7 @@ declare namespace Components {
1471
1467
  de: string;
1472
1468
  };
1473
1469
  /**
1474
- * JavaScript code to execute. Must declare a top-level `async function handler(input, context)`. Maximum size: 300KB (hard limit). Security restrictions: eval() and Function() constructor are not allowed.
1470
+ * JavaScript code to execute. Must declare a top-level `async function handler(input, context)`. Maximum size: 300KB (hard limit). Security restrictions: dynamic code evaluation via `eval` or the `Function` constructor is not allowed.
1475
1471
  *
1476
1472
  */
1477
1473
  code: string;
@@ -2030,7 +2026,7 @@ declare namespace Components {
2030
2026
  * { "id": "ht", "label": { "en": "High tariff" }, "aggregation_group": "consumption", "statistical_method": "sum", "unit": "kWh", "color": "primary", "precision": 2 },
2031
2027
  * ...
2032
2028
  * ],
2033
- * "intervals": ["PT15M", "PT1H", "P1D", "P1M", "P1Y"],
2029
+ * "intervals": ["PT15M", "PT1H", "P1D", "P1M", "P1Y", "custom"],
2034
2030
  * "data_range": { "from": "2024-01-01T00:00:00Z", "to": "2026-05-01T00:00:00Z" }
2035
2031
  * }
2036
2032
  * 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.
@@ -2271,9 +2267,10 @@ declare namespace Components {
2271
2267
  /**
2272
2268
  * 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.
2273
2269
  * Intervals supported by the API. If omitted, it is assumed that all intervals are supported.
2270
+ * `custom` marks a period-based consumption source: records carry the `period` they cover instead of sitting on a fixed grid, and the portal shows the whole data range as one bar per record.
2274
2271
  *
2275
2272
  */
2276
- intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y")[];
2273
+ intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y" | "custom")[];
2277
2274
  auth?: PortalExtensionAuthBlock;
2278
2275
  call: {
2279
2276
  /**
@@ -2442,9 +2439,10 @@ declare namespace Components {
2442
2439
  /**
2443
2440
  * 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.
2444
2441
  * Intervals supported by the API. If omitted, it is assumed that all intervals are supported.
2442
+ * `custom` marks a period-based consumption source: records carry the `period` they cover instead of sitting on a fixed grid, and the portal shows the whole data range as one bar per record.
2445
2443
  *
2446
2444
  */
2447
- intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y")[];
2445
+ intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y" | "custom")[];
2448
2446
  auth?: PortalExtensionAuthBlock;
2449
2447
  call: {
2450
2448
  /**
@@ -2773,9 +2771,10 @@ declare namespace Components {
2773
2771
  /**
2774
2772
  * 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.
2775
2773
  * Intervals supported by the API. If omitted, it is assumed that all intervals are supported.
2774
+ * `custom` marks a period-based consumption source: records carry the `period` they cover instead of sitting on a fixed grid, and the portal shows the whole data range as one bar per record.
2776
2775
  *
2777
2776
  */
2778
- intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y")[];
2777
+ intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y" | "custom")[];
2779
2778
  auth?: PortalExtensionAuthBlock;
2780
2779
  call: {
2781
2780
  /**
@@ -2907,7 +2906,7 @@ declare namespace Components {
2907
2906
  * { "id": "ht", "label": { "en": "High tariff" }, "aggregation_group": "consumption", "statistical_method": "sum", "unit": "kWh", "color": "primary", "precision": 2 },
2908
2907
  * ...
2909
2908
  * ],
2910
- * "intervals": ["PT15M", "PT1H", "P1D", "P1M", "P1Y"],
2909
+ * "intervals": ["PT15M", "PT1H", "P1D", "P1M", "P1Y", "custom"],
2911
2910
  * "data_range": { "from": "2024-01-01T00:00:00Z", "to": "2026-05-01T00:00:00Z" }
2912
2911
  * }
2913
2912
  * 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.
package/dist/openapi.json CHANGED
@@ -511,6 +511,7 @@
511
511
  }
512
512
  ],
513
513
  "requestBody": {
514
+ "required": true,
514
515
  "content": {
515
516
  "application/json": {
516
517
  "schema": {
@@ -1974,6 +1975,7 @@
1974
1975
  }
1975
1976
  },
1976
1977
  "InstallRequest": {
1978
+ "required": true,
1977
1979
  "content": {
1978
1980
  "application/json": {
1979
1981
  "schema": {
@@ -2254,7 +2256,7 @@
2254
2256
  "code": {
2255
2257
  "type": "string",
2256
2258
  "maxLength": 307200,
2257
- "description": "JavaScript code to execute. Must declare a top-level `async function handler(input, context)`. Maximum size: 300KB (hard limit). Security restrictions: eval() and Function() constructor are not allowed.\n"
2259
+ "description": "JavaScript code to execute. Must declare a top-level `async function handler(input, context)`. Maximum size: 300KB (hard limit). Security restrictions: dynamic code evaluation via `eval` or the `Function` constructor is not allowed.\n"
2258
2260
  },
2259
2261
  "schedule": {
2260
2262
  "type": "string",
@@ -3417,7 +3419,7 @@
3417
3419
  "intervals": {
3418
3420
  "type": "array",
3419
3421
  "deprecated": true,
3420
- "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",
3422
+ "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`custom` marks a period-based consumption source: records carry the `period` they cover instead of sitting on a fixed grid, and the portal shows the whole data range as one bar per record.\n",
3421
3423
  "items": {
3422
3424
  "type": "string",
3423
3425
  "enum": [
@@ -3425,7 +3427,8 @@
3425
3427
  "PT1H",
3426
3428
  "P1D",
3427
3429
  "P1M",
3428
- "P1Y"
3430
+ "P1Y",
3431
+ "custom"
3429
3432
  ]
3430
3433
  }
3431
3434
  },
@@ -3529,7 +3532,7 @@
3529
3532
  "intervals": {
3530
3533
  "type": "array",
3531
3534
  "deprecated": true,
3532
- "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",
3535
+ "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`custom` marks a period-based consumption source: records carry the `period` they cover instead of sitting on a fixed grid, and the portal shows the whole data range as one bar per record.\n",
3533
3536
  "items": {
3534
3537
  "type": "string",
3535
3538
  "enum": [
@@ -3537,7 +3540,8 @@
3537
3540
  "PT1H",
3538
3541
  "P1D",
3539
3542
  "P1M",
3540
- "P1Y"
3543
+ "P1Y",
3544
+ "custom"
3541
3545
  ]
3542
3546
  }
3543
3547
  },
@@ -3716,7 +3720,7 @@
3716
3720
  "additionalProperties": false
3717
3721
  },
3718
3722
  "PortalExtensionHookVisualizationMetadata": {
3719
- "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\": \"ht\", \"label\": { \"en\": \"High tariff\" }, \"aggregation_group\": \"consumption\", \"statistical_method\": \"sum\", \"unit\": \"kWh\", \"color\": \"primary\", \"precision\": 2 },\n ...\n ],\n \"intervals\": [\"PT15M\", \"PT1H\", \"P1D\", \"P1M\", \"P1Y\"],\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 Each type option may also customize its rendering: `color` picks a Spark palette color (`primary`, `slate`, `mauve`, `orange`, `red`, `tomato`, `amber`, `green`, `blue`) used to draw the type's series; `precision` sets the number of decimal places to show for that type's values (axis labels, tooltips, summaries). Both are optional — the consumer falls back to its own defaults when they are 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",
3723
+ "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\": \"ht\", \"label\": { \"en\": \"High tariff\" }, \"aggregation_group\": \"consumption\", \"statistical_method\": \"sum\", \"unit\": \"kWh\", \"color\": \"primary\", \"precision\": 2 },\n ...\n ],\n \"intervals\": [\"PT15M\", \"PT1H\", \"P1D\", \"P1M\", \"P1Y\", \"custom\"],\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 Each type option may also customize its rendering: `color` picks a Spark palette color (`primary`, `slate`, `mauve`, `orange`, `red`, `tomato`, `amber`, `green`, `blue`) used to draw the type's series; `precision` sets the number of decimal places to show for that type's values (axis labels, tooltips, summaries). Both are optional — the consumer falls back to its own defaults when they are 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",
3720
3724
  "type": "object",
3721
3725
  "properties": {
3722
3726
  "id": {
@@ -3833,7 +3837,7 @@
3833
3837
  "intervals": {
3834
3838
  "type": "array",
3835
3839
  "deprecated": true,
3836
- "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",
3840
+ "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`custom` marks a period-based consumption source: records carry the `period` they cover instead of sitting on a fixed grid, and the portal shows the whole data range as one bar per record.\n",
3837
3841
  "items": {
3838
3842
  "type": "string",
3839
3843
  "enum": [
@@ -3841,7 +3845,8 @@
3841
3845
  "PT1H",
3842
3846
  "P1D",
3843
3847
  "P1M",
3844
- "P1Y"
3848
+ "P1Y",
3849
+ "custom"
3845
3850
  ]
3846
3851
  }
3847
3852
  },
@@ -5276,10 +5281,6 @@
5276
5281
  }
5277
5282
  }
5278
5283
  },
5279
- "use_static_ips": {
5280
- "type": "boolean",
5281
- "description": "If set, requests are sent from epilot's static egress IPs. Mutually exclusive with secure_proxy."
5282
- },
5283
5284
  "secure_proxy": {
5284
5285
  "$ref": "#/components/schemas/PortalExtensionSecureProxy"
5285
5286
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "JavaScript client library for the epilot App API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,20 +21,6 @@
21
21
  "sdk",
22
22
  "app"
23
23
  ],
24
- "scripts": {
25
- "test": "vitest",
26
- "typescript": "tsc",
27
- "bundle-definition": "webpack",
28
- "openapi:local": "node ../../scripts/update-openapi.js ../../../app-api/openapi.yml",
29
- "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/app.yaml",
30
- "typegen": "openapi typegen src/openapi.json --client > src/openapi.d.ts",
31
- "build": "tsc && npm run build:patch && npm run bundle-definition",
32
- "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
33
- "build:watch": "npm run build && tsc -w",
34
- "release-alpha": "npm version prerelease --preid alpha",
35
- "prepublishOnly": "npm run typegen && npm run build",
36
- "lint": "biome check src"
37
- },
38
24
  "files": [
39
25
  "*.js",
40
26
  "*.d.ts",
@@ -71,5 +57,18 @@
71
57
  "webpack": "^5.18.0",
72
58
  "webpack-cli": "^4.4.0"
73
59
  },
74
- "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
75
- }
60
+ "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7",
61
+ "scripts": {
62
+ "test": "vitest",
63
+ "typescript": "tsc",
64
+ "bundle-definition": "webpack",
65
+ "openapi:local": "node ../../scripts/update-openapi.js ../../../app-api/openapi.yml",
66
+ "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/app.yaml",
67
+ "typegen": "openapi typegen src/openapi.json --client > src/openapi.d.ts",
68
+ "build": "tsc && npm run build:patch && npm run bundle-definition",
69
+ "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",
70
+ "build:watch": "npm run build && tsc -w",
71
+ "release-alpha": "npm version prerelease --preid alpha",
72
+ "lint": "biome check src"
73
+ }
74
+ }