@epilot/app-client 0.10.3 → 0.10.5

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={390:function(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/{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}],"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-events":{"post":{"operationId":"ingestEvent","requestBody":{"required":true,"content":{"application/json":{}}},"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":{}}},"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}(390),n=exports;for(var o in t)n[o]=t[o];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={330:function(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/{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}],"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-events":{"post":{"operationId":"ingestEvent","requestBody":{"required":true,"content":{"application/json":{}}},"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":{}}},"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}(330),n=exports;for(var o in t)n[o]=t[o];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
package/dist/openapi.d.ts CHANGED
@@ -247,7 +247,7 @@ declare namespace Components {
247
247
  surfaces?: {
248
248
  [key: string]: any;
249
249
  };
250
- } & (JourneyBlockComponent | PortalExtensionComponent | CustomFlowActionComponent | ErpInformToolkitComponent | CustomCapabilityComponent | ExternalProductCatalogComponent);
250
+ } & (JourneyBlockComponent | PortalBlockComponent | PortalExtensionComponent | CustomFlowActionComponent | ErpInformToolkitComponent | CustomCapabilityComponent | ExternalProductCatalogComponent);
251
251
  export interface BaseComponentCommon {
252
252
  /**
253
253
  * Unique identifier for the component
@@ -451,7 +451,7 @@ declare namespace Components {
451
451
  /**
452
452
  * Type of app component
453
453
  */
454
- export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG";
454
+ export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG";
455
455
  /**
456
456
  * Configuration of the published app
457
457
  */
@@ -992,7 +992,7 @@ declare namespace Components {
992
992
  * JSON body to use for authentication. Supports variable interpolation. Content format is determined by Content-Type header.
993
993
  */
994
994
  body?: {
995
- [name: string]: string;
995
+ [name: string]: any;
996
996
  };
997
997
  }
998
998
  export interface ExternalProductCatalogComponent {
@@ -1047,7 +1047,7 @@ declare namespace Components {
1047
1047
  * JSON body to use for the call. Supports variable interpolation. If empty / not provided, the default request context will be used based on the consumer (e.g. Journey).
1048
1048
  */
1049
1049
  body?: {
1050
- [name: string]: string;
1050
+ [name: string]: any;
1051
1051
  };
1052
1052
  };
1053
1053
  }
@@ -1088,7 +1088,7 @@ declare namespace Components {
1088
1088
  * JSON body to use for the call. Supports variable interpolation. If empty / not provided, the default request context will be used based on the consumer (e.g. Journey).
1089
1089
  */
1090
1090
  body?: {
1091
- [name: string]: string;
1091
+ [name: string]: any;
1092
1092
  };
1093
1093
  };
1094
1094
  }
@@ -1307,6 +1307,33 @@ declare namespace Components {
1307
1307
  */
1308
1308
  override_url?: string;
1309
1309
  }
1310
+ export interface PortalBlockComponent {
1311
+ component_type: "CUSTOM_PORTAL_BLOCK";
1312
+ configuration: PortalBlockConfig;
1313
+ surfaces?: {
1314
+ portal_block?: PortalBlockSurfaceConfig;
1315
+ };
1316
+ }
1317
+ export interface PortalBlockConfig {
1318
+ }
1319
+ export interface PortalBlockSurfaceConfig {
1320
+ /**
1321
+ * URL of the uploaded App Bridge App. This is the entrypoint for the app
1322
+ */
1323
+ app_url?: string;
1324
+ /**
1325
+ * URL of the uploaded zip file containing the app
1326
+ */
1327
+ zip_url?: string;
1328
+ /**
1329
+ * URL of the app in dev mode
1330
+ */
1331
+ override_url?: string;
1332
+ /**
1333
+ * Define which section of the portal this block can be placed in
1334
+ */
1335
+ section?: "main" | "footer";
1336
+ }
1310
1337
  export interface PortalExtensionAuthBlock {
1311
1338
  /**
1312
1339
  * HTTP method to use for authentication
@@ -1332,7 +1359,7 @@ declare namespace Components {
1332
1359
  * JSON body to use for authentication. Supports variable interpolation. Content format is determined by Content-Type header.
1333
1360
  */
1334
1361
  body?: {
1335
- [name: string]: string;
1362
+ [name: string]: any;
1336
1363
  };
1337
1364
  cache?: {
1338
1365
  /**
@@ -1437,7 +1464,7 @@ declare namespace Components {
1437
1464
  /**
1438
1465
  * Identifier of the hook. Should not change between updates.
1439
1466
  */
1440
- id?: string; // ^[a-zA-Z0-9_-]+$
1467
+ id: string; // ^[a-zA-Z0-9_-]+$
1441
1468
  name?: TranslatedString;
1442
1469
  type: "consumptionDataRetrieval";
1443
1470
  /**
@@ -1470,7 +1497,7 @@ declare namespace Components {
1470
1497
  * Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.
1471
1498
  */
1472
1499
  body?: {
1473
- [name: string]: string;
1500
+ [name: string]: any;
1474
1501
  };
1475
1502
  };
1476
1503
  resolved?: {
@@ -1502,7 +1529,7 @@ declare namespace Components {
1502
1529
  /**
1503
1530
  * Identifier of the hook. Should not change between updates.
1504
1531
  */
1505
- id?: string; // ^[a-zA-Z0-9_-]+$
1532
+ id: string; // ^[a-zA-Z0-9_-]+$
1506
1533
  name?: TranslatedString;
1507
1534
  type: "contractIdentification";
1508
1535
  auth?: PortalExtensionAuthBlock;
@@ -1534,7 +1561,7 @@ declare namespace Components {
1534
1561
  [key: string]: any;
1535
1562
  };
1536
1563
  /**
1537
- * Contract or Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. Supports variable interpolation.
1564
+ * Contract or Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. If no result is passed and the request suceeds, we attempt to resolve the Contact ID automatically. Supports variable interpolation.
1538
1565
  */
1539
1566
  result?: string;
1540
1567
  };
@@ -1574,7 +1601,7 @@ declare namespace Components {
1574
1601
  /**
1575
1602
  * Identifier of the hook. Should not change between updates.
1576
1603
  */
1577
- id?: string; // ^[a-zA-Z0-9_-]+$
1604
+ id: string; // ^[a-zA-Z0-9_-]+$
1578
1605
  name?: TranslatedString;
1579
1606
  type: "costDataRetrieval";
1580
1607
  /**
@@ -1607,7 +1634,7 @@ declare namespace Components {
1607
1634
  * Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.
1608
1635
  */
1609
1636
  body?: {
1610
- [name: string]: string;
1637
+ [name: string]: any;
1611
1638
  };
1612
1639
  };
1613
1640
  resolved?: {
@@ -1634,9 +1661,16 @@ declare namespace Components {
1634
1661
  /**
1635
1662
  * Identifier of the hook. Should not change between updates.
1636
1663
  */
1637
- id?: string; // ^[a-zA-Z0-9_-]+$
1664
+ id: string; // ^[a-zA-Z0-9_-]+$
1638
1665
  name?: TranslatedString;
1639
1666
  type: "meterReadingPlausibilityCheck";
1667
+ /**
1668
+ * Mode for plausibility check:
1669
+ * - "check": Validates meter reading and returns valid: boolean (used during submission)
1670
+ * - "range": Returns min/max allowed values for each counter for validation before submission
1671
+ *
1672
+ */
1673
+ plausibility_mode?: "check" | "range";
1640
1674
  auth?: PortalExtensionAuthBlock;
1641
1675
  call: {
1642
1676
  /**
@@ -1647,7 +1681,7 @@ declare namespace Components {
1647
1681
  * JSON body to use for the call. Supports variable interpolation.
1648
1682
  */
1649
1683
  body: {
1650
- [name: string]: string;
1684
+ [name: string]: any;
1651
1685
  };
1652
1686
  /**
1653
1687
  * Headers to use. Supports variable interpolation.
@@ -1659,9 +1693,32 @@ declare namespace Components {
1659
1693
  /**
1660
1694
  * Response to the call
1661
1695
  */
1662
- resolved?: {
1696
+ resolved: {
1697
+ /**
1698
+ * Optional path to an array in the response. If specified and the path points to an array,
1699
+ * the hook will map over each item using 'Item' variable for interpolation.
1700
+ * Relevant only if plausibility_mode is "range".
1701
+ *
1702
+ * example:
1703
+ * data.results
1704
+ */
1705
+ dataPath?: string;
1706
+ /**
1707
+ * Counter identifier(s) used to match against the meter's counters.
1708
+ * Can be a string (counter ID) or an object with counter properties.
1709
+ * The backend resolves this to meter_counter_id in the final response.
1710
+ * Relevant only if plausibility_mode is "range".
1711
+ *
1712
+ * example:
1713
+ * {
1714
+ * "obis_code": "{{Item.obis}}"
1715
+ * }
1716
+ */
1717
+ counter_identifiers?: {
1718
+ [name: string]: string;
1719
+ };
1663
1720
  /**
1664
- * Indicate whether the meter reading is plausible
1721
+ * Indicate whether the meter reading is plausible. Relevant only if plausibility_mode is "check".
1665
1722
  * example:
1666
1723
  * {{CallResponse.data.valid}}
1667
1724
  */
@@ -1693,7 +1750,7 @@ declare namespace Components {
1693
1750
  /**
1694
1751
  * Identifier of the hook. Should not change between updates.
1695
1752
  */
1696
- id?: string; // ^[a-zA-Z0-9_-]+$
1753
+ id: string; // ^[a-zA-Z0-9_-]+$
1697
1754
  name?: TranslatedString;
1698
1755
  type: "priceDataRetrieval";
1699
1756
  /**
@@ -1726,7 +1783,7 @@ declare namespace Components {
1726
1783
  * Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.
1727
1784
  */
1728
1785
  body?: {
1729
- [name: string]: string;
1786
+ [name: string]: any;
1730
1787
  };
1731
1788
  };
1732
1789
  resolved?: {
@@ -1750,7 +1807,7 @@ declare namespace Components {
1750
1807
  /**
1751
1808
  * Identifier of the hook. Should not change between updates.
1752
1809
  */
1753
- id?: string; // ^[a-zA-Z0-9_-]+$
1810
+ id: string; // ^[a-zA-Z0-9_-]+$
1754
1811
  name?: TranslatedString;
1755
1812
  type: "registrationIdentifiersCheck";
1756
1813
  auth?: PortalExtensionAuthBlock;
@@ -1782,7 +1839,7 @@ declare namespace Components {
1782
1839
  [key: string]: any;
1783
1840
  };
1784
1841
  /**
1785
- * Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. Supports variable interpolation.
1842
+ * Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. If no result is passed and the request suceeds, we attempt to resolve the Contact ID automatically. Supports variable interpolation.
1786
1843
  */
1787
1844
  result: string;
1788
1845
  };
@@ -3214,6 +3271,9 @@ export type Option = Components.Schemas.Option;
3214
3271
  export type Options = Components.Schemas.Options;
3215
3272
  export type OptionsRef = Components.Schemas.OptionsRef;
3216
3273
  export type OverrideDevMode = Components.Schemas.OverrideDevMode;
3274
+ export type PortalBlockComponent = Components.Schemas.PortalBlockComponent;
3275
+ export type PortalBlockConfig = Components.Schemas.PortalBlockConfig;
3276
+ export type PortalBlockSurfaceConfig = Components.Schemas.PortalBlockSurfaceConfig;
3217
3277
  export type PortalExtensionAuthBlock = Components.Schemas.PortalExtensionAuthBlock;
3218
3278
  export type PortalExtensionComponent = Components.Schemas.PortalExtensionComponent;
3219
3279
  export type PortalExtensionConfig = Components.Schemas.PortalExtensionConfig;
package/dist/openapi.json CHANGED
@@ -20,9 +20,6 @@
20
20
  }
21
21
  ],
22
22
  "servers": [
23
- {
24
- "url": "https://app.sls.epilot.io"
25
- },
26
23
  {
27
24
  "url": "https://app.sls.epilot.io"
28
25
  }
@@ -1765,6 +1762,7 @@
1765
1762
  "type": "string",
1766
1763
  "enum": [
1767
1764
  "CUSTOM_JOURNEY_BLOCK",
1765
+ "CUSTOM_PORTAL_BLOCK",
1768
1766
  "PORTAL_EXTENSION",
1769
1767
  "CUSTOM_FLOW_ACTION",
1770
1768
  "ERP_INFORM_TOOLKIT",
@@ -1875,6 +1873,7 @@
1875
1873
  "propertyName": "component_type",
1876
1874
  "mapping": {
1877
1875
  "CUSTOM_JOURNEY_BLOCK": "#/components/schemas/JourneyBlockComponent",
1876
+ "CUSTOM_PORTAL_BLOCK": "#/components/schemas/PortalBlockComponent",
1878
1877
  "PORTAL_EXTENSION": "#/components/schemas/PortalExtensionComponent",
1879
1878
  "CUSTOM_FLOW_ACTION": "#/components/schemas/CustomFlowActionComponent",
1880
1879
  "ERP_INFORM_TOOLKIT": "#/components/schemas/ErpInformToolkitComponent",
@@ -1886,6 +1885,9 @@
1886
1885
  {
1887
1886
  "$ref": "#/components/schemas/JourneyBlockComponent"
1888
1887
  },
1888
+ {
1889
+ "$ref": "#/components/schemas/PortalBlockComponent"
1890
+ },
1889
1891
  {
1890
1892
  "$ref": "#/components/schemas/PortalExtensionComponent"
1891
1893
  },
@@ -1968,6 +1970,32 @@
1968
1970
  }
1969
1971
  }
1970
1972
  },
1973
+ "PortalBlockComponent": {
1974
+ "type": "object",
1975
+ "required": [
1976
+ "component_type",
1977
+ "configuration"
1978
+ ],
1979
+ "properties": {
1980
+ "component_type": {
1981
+ "type": "string",
1982
+ "enum": [
1983
+ "CUSTOM_PORTAL_BLOCK"
1984
+ ]
1985
+ },
1986
+ "configuration": {
1987
+ "$ref": "#/components/schemas/PortalBlockConfig"
1988
+ },
1989
+ "surfaces": {
1990
+ "type": "object",
1991
+ "properties": {
1992
+ "portal_block": {
1993
+ "$ref": "#/components/schemas/PortalBlockSurfaceConfig"
1994
+ }
1995
+ }
1996
+ }
1997
+ }
1998
+ },
1971
1999
  "ErpInformToolkitComponent": {
1972
2000
  "type": "object",
1973
2001
  "required": [
@@ -2221,10 +2249,7 @@
2221
2249
  "body": {
2222
2250
  "type": "object",
2223
2251
  "description": "JSON body to use for the call. Supports variable interpolation. If empty / not provided, the default request context will be used based on the consumer (e.g. Journey).",
2224
- "additionalProperties": {
2225
- "type": "string"
2226
- },
2227
- "default": {}
2252
+ "additionalProperties": true
2228
2253
  }
2229
2254
  },
2230
2255
  "required": [
@@ -2292,10 +2317,7 @@
2292
2317
  "body": {
2293
2318
  "type": "object",
2294
2319
  "description": "JSON body to use for the call. Supports variable interpolation. If empty / not provided, the default request context will be used based on the consumer (e.g. Journey).",
2295
- "additionalProperties": {
2296
- "type": "string"
2297
- },
2298
- "default": {}
2320
+ "additionalProperties": true
2299
2321
  }
2300
2322
  },
2301
2323
  "required": [
@@ -2437,7 +2459,7 @@
2437
2459
  },
2438
2460
  "result": {
2439
2461
  "type": "string",
2440
- "description": "Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. Supports variable interpolation."
2462
+ "description": "Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. If no result is passed and the request suceeds, we attempt to resolve the Contact ID automatically. Supports variable interpolation."
2441
2463
  }
2442
2464
  },
2443
2465
  "required": [
@@ -2454,6 +2476,7 @@
2454
2476
  }
2455
2477
  },
2456
2478
  "required": [
2479
+ "id",
2457
2480
  "type",
2458
2481
  "call"
2459
2482
  ],
@@ -2514,7 +2537,7 @@
2514
2537
  },
2515
2538
  "result": {
2516
2539
  "type": "string",
2517
- "description": "Contract or Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. Supports variable interpolation."
2540
+ "description": "Contract or Contact ID usually retrieved from the response body, e.g. `{{CallResponse.data.contact_id}}`. If no result is passed and the request suceeds, we attempt to resolve the Contact ID automatically. Supports variable interpolation."
2518
2541
  }
2519
2542
  },
2520
2543
  "required": [
@@ -2563,6 +2586,7 @@
2563
2586
  }
2564
2587
  },
2565
2588
  "required": [
2589
+ "id",
2566
2590
  "type",
2567
2591
  "call"
2568
2592
  ],
@@ -2586,6 +2610,15 @@
2586
2610
  "meterReadingPlausibilityCheck"
2587
2611
  ]
2588
2612
  },
2613
+ "plausibility_mode": {
2614
+ "type": "string",
2615
+ "enum": [
2616
+ "check",
2617
+ "range"
2618
+ ],
2619
+ "default": "check",
2620
+ "description": "Mode for plausibility check:\n- \"check\": Validates meter reading and returns valid: boolean (used during submission)\n- \"range\": Returns min/max allowed values for each counter for validation before submission\n"
2621
+ },
2589
2622
  "auth": {
2590
2623
  "$ref": "#/components/schemas/PortalExtensionAuthBlock"
2591
2624
  },
@@ -2599,10 +2632,7 @@
2599
2632
  "body": {
2600
2633
  "type": "object",
2601
2634
  "description": "JSON body to use for the call. Supports variable interpolation.",
2602
- "additionalProperties": {
2603
- "type": "string"
2604
- },
2605
- "default": {}
2635
+ "additionalProperties": true
2606
2636
  },
2607
2637
  "headers": {
2608
2638
  "type": "object",
@@ -2616,8 +2646,7 @@
2616
2646
  "required": [
2617
2647
  "url",
2618
2648
  "headers",
2619
- "body",
2620
- "result"
2649
+ "body"
2621
2650
  ],
2622
2651
  "additionalProperties": false
2623
2652
  },
@@ -2625,9 +2654,24 @@
2625
2654
  "type": "object",
2626
2655
  "description": "Response to the call",
2627
2656
  "properties": {
2657
+ "dataPath": {
2658
+ "type": "string",
2659
+ "description": "Optional path to an array in the response. If specified and the path points to an array,\nthe hook will map over each item using 'Item' variable for interpolation.\nRelevant only if plausibility_mode is \"range\".\n",
2660
+ "example": "data.results"
2661
+ },
2662
+ "counter_identifiers": {
2663
+ "description": "Counter identifier(s) used to match against the meter's counters.\nCan be a string (counter ID) or an object with counter properties.\nThe backend resolves this to meter_counter_id in the final response.\nRelevant only if plausibility_mode is \"range\".\n",
2664
+ "type": "object",
2665
+ "additionalProperties": {
2666
+ "type": "string"
2667
+ },
2668
+ "example": {
2669
+ "obis_code": "{{Item.obis}}"
2670
+ }
2671
+ },
2628
2672
  "valid": {
2629
2673
  "type": "string",
2630
- "description": "Indicate whether the meter reading is plausible",
2674
+ "description": "Indicate whether the meter reading is plausible. Relevant only if plausibility_mode is \"check\".",
2631
2675
  "example": "{{CallResponse.data.valid}}"
2632
2676
  },
2633
2677
  "upper_limit": {
@@ -2650,8 +2694,10 @@
2650
2694
  }
2651
2695
  },
2652
2696
  "required": [
2697
+ "id",
2653
2698
  "type",
2654
- "call"
2699
+ "call",
2700
+ "resolved"
2655
2701
  ],
2656
2702
  "additionalProperties": false
2657
2703
  },
@@ -2720,10 +2766,7 @@
2720
2766
  "body": {
2721
2767
  "type": "object",
2722
2768
  "description": "Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.",
2723
- "additionalProperties": {
2724
- "type": "string"
2725
- },
2726
- "default": {}
2769
+ "additionalProperties": true
2727
2770
  }
2728
2771
  },
2729
2772
  "required": [
@@ -2748,6 +2791,7 @@
2748
2791
  }
2749
2792
  },
2750
2793
  "required": [
2794
+ "id",
2751
2795
  "type",
2752
2796
  "call"
2753
2797
  ],
@@ -2818,10 +2862,7 @@
2818
2862
  "body": {
2819
2863
  "type": "object",
2820
2864
  "description": "Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.",
2821
- "additionalProperties": {
2822
- "type": "string"
2823
- },
2824
- "default": {}
2865
+ "additionalProperties": true
2825
2866
  }
2826
2867
  },
2827
2868
  "required": [
@@ -2846,6 +2887,7 @@
2846
2887
  }
2847
2888
  },
2848
2889
  "required": [
2890
+ "id",
2849
2891
  "type",
2850
2892
  "call"
2851
2893
  ],
@@ -2916,10 +2958,7 @@
2916
2958
  "body": {
2917
2959
  "type": "object",
2918
2960
  "description": "Request body to send. Supports variable interpolation. Content format is determined by Content-Type header.",
2919
- "additionalProperties": {
2920
- "type": "string"
2921
- },
2922
- "default": {}
2961
+ "additionalProperties": true
2923
2962
  }
2924
2963
  },
2925
2964
  "required": [
@@ -2944,6 +2983,7 @@
2944
2983
  }
2945
2984
  },
2946
2985
  "required": [
2986
+ "id",
2947
2987
  "type",
2948
2988
  "call"
2949
2989
  ],
@@ -3035,10 +3075,7 @@
3035
3075
  "body": {
3036
3076
  "type": "object",
3037
3077
  "description": "JSON body to use for authentication. Supports variable interpolation. Content format is determined by Content-Type header.",
3038
- "additionalProperties": {
3039
- "type": "string"
3040
- },
3041
- "default": {}
3078
+ "additionalProperties": true
3042
3079
  },
3043
3080
  "cache": {
3044
3081
  "type": "object",
@@ -3097,10 +3134,7 @@
3097
3134
  "body": {
3098
3135
  "type": "object",
3099
3136
  "description": "JSON body to use for authentication. Supports variable interpolation. Content format is determined by Content-Type header.",
3100
- "additionalProperties": {
3101
- "type": "string"
3102
- },
3103
- "default": {}
3137
+ "additionalProperties": true
3104
3138
  }
3105
3139
  },
3106
3140
  "required": [
@@ -3168,6 +3202,9 @@
3168
3202
  }
3169
3203
  }
3170
3204
  },
3205
+ "PortalBlockConfig": {
3206
+ "type": "object"
3207
+ },
3171
3208
  "AppBridgeSurfaceConfig": {
3172
3209
  "type": "object",
3173
3210
  "properties": {
@@ -3185,6 +3222,26 @@
3185
3222
  }
3186
3223
  }
3187
3224
  },
3225
+ "PortalBlockSurfaceConfig": {
3226
+ "allOf": [
3227
+ {
3228
+ "$ref": "#/components/schemas/AppBridgeSurfaceConfig"
3229
+ },
3230
+ {
3231
+ "type": "object",
3232
+ "properties": {
3233
+ "section": {
3234
+ "description": "Define which section of the portal this block can be placed in",
3235
+ "type": "string",
3236
+ "enum": [
3237
+ "main",
3238
+ "footer"
3239
+ ]
3240
+ }
3241
+ }
3242
+ }
3243
+ ]
3244
+ },
3188
3245
  "JourneyBlockComponentArgs": {
3189
3246
  "allOf": [
3190
3247
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.10.3",
3
+ "version": "0.10.5",
4
4
  "description": "JavaScript client library for the epilot App API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",