@epilot/app-client 0.14.1 → 0.16.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={330(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}],"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":{}}},"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})})();
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})})();
@@ -393,6 +393,9 @@
393
393
  "required": true
394
394
  }
395
395
  ],
396
+ "requestBody": {
397
+ "$ref": "#/components/requestBodies/CloneVersionRequest"
398
+ },
396
399
  "responses": {}
397
400
  }
398
401
  },
@@ -618,6 +621,12 @@
618
621
  "application/json": {}
619
622
  }
620
623
  },
624
+ "CloneVersionRequest": {
625
+ "required": false,
626
+ "content": {
627
+ "application/json": {}
628
+ }
629
+ },
621
630
  "UpsertComponentRequest": {
622
631
  "required": true,
623
632
  "content": {
package/dist/openapi.d.ts CHANGED
@@ -8,6 +8,12 @@ import type {
8
8
 
9
9
  declare namespace Components {
10
10
  namespace RequestBodies {
11
+ export interface CloneVersionRequest {
12
+ /**
13
+ * Short description of what the new version will change
14
+ */
15
+ changelog?: string;
16
+ }
11
17
  export interface CreateBundlePresignedRequest {
12
18
  /**
13
19
  * Version of the app
@@ -119,7 +125,11 @@ declare namespace Components {
119
125
  * sensitive and must not declare `sensitive: false`.
120
126
  *
121
127
  */
122
- options?: /* Options for the component configuration */ Schemas.Options[];
128
+ options?: /* An option declaration — a setting the installing org fills in. Declared at app level. */ Schemas.Options[];
129
+ /**
130
+ * Short description of what changed in this version
131
+ */
132
+ changelog?: string;
123
133
  }
124
134
  export type UpsertComponentRequest = Schemas.BaseComponent;
125
135
  }
@@ -291,7 +301,7 @@ declare namespace Components {
291
301
  /**
292
302
  * List of options for the app component
293
303
  */
294
- options?: /* Options for the component configuration */ Options[];
304
+ options?: /* An option declaration — a setting the installing org fills in. Declared at app level. */ Options[];
295
305
  /**
296
306
  * Keys of app-level options this component uses. Narrows which options are
297
307
  * folded back into `options` for legacy consumers (e.g. which values a journey
@@ -304,7 +314,11 @@ declare namespace Components {
304
314
  surfaces?: {
305
315
  [key: string]: any;
306
316
  };
307
- } & (JourneyBlockComponent | PortalBlockComponent | PortalExtensionComponent | CustomFlowActionComponent | ErpInformToolkitComponent | CustomCapabilityComponent | ExternalProductCatalogComponent | CustomPageComponent | ApiProxyComponent);
317
+ } & (JourneyBlockComponent | PortalBlockComponent | PortalExtensionComponent | CustomFlowActionComponent | ErpInformToolkitComponent | CustomCapabilityComponent | ExternalProductCatalogComponent | CustomPageComponent | ApiProxyComponent | /**
318
+ * Exposes typed values resolved from an external system at runtime (e.g. a meter reading prediction). Consumers such as validation rules reference a hook and one of its results by id. Resolution is performed by the external-values-api on behalf of authenticated epilot 360 users and portal end customers.
319
+ *
320
+ */
321
+ ExternalValuesComponent);
308
322
  export interface BaseComponentCommon {
309
323
  /**
310
324
  * Unique identifier for the component
@@ -339,7 +353,7 @@ declare namespace Components {
339
353
  /**
340
354
  * List of options for the app component
341
355
  */
342
- options?: /* Options for the component configuration */ Options[];
356
+ options?: /* An option declaration — a setting the installing org fills in. Declared at app level. */ Options[];
343
357
  /**
344
358
  * Keys of app-level options this component uses. Narrows which options are
345
359
  * folded back into `options` for legacy consumers (e.g. which values a journey
@@ -537,7 +551,7 @@ declare namespace Components {
537
551
  /**
538
552
  * Type of app component
539
553
  */
540
- export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG" | "CUSTOM_PAGE" | "API_PROXY" | "APP_FUNCTION";
554
+ export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG" | "CUSTOM_PAGE" | "API_PROXY" | "EXTERNAL_VALUES" | "APP_FUNCTION";
541
555
  /**
542
556
  * Configuration of the published app
543
557
  */
@@ -656,7 +670,7 @@ declare namespace Components {
656
670
  /**
657
671
  * App-level option declarations (with sensitivity) of this version
658
672
  */
659
- options?: /* Options for the component configuration */ Options[];
673
+ options?: /* An option declaration — a setting the installing org fills in. Declared at app level. */ Options[];
660
674
  /**
661
675
  * Visibility of the app version
662
676
  */
@@ -846,7 +860,7 @@ declare namespace Components {
846
860
  /**
847
861
  * App-level option declarations (with sensitivity) of this version
848
862
  */
849
- options?: /* Options for the component configuration */ Options[];
863
+ options?: /* An option declaration — a setting the installing org fills in. Declared at app level. */ Options[];
850
864
  /**
851
865
  * Visibility of the app version
852
866
  */
@@ -1254,6 +1268,167 @@ declare namespace Components {
1254
1268
  };
1255
1269
  };
1256
1270
  }
1271
+ /**
1272
+ * Exposes typed values resolved from an external system at runtime (e.g. a meter reading prediction). Consumers such as validation rules reference a hook and one of its results by id. Resolution is performed by the external-values-api on behalf of authenticated epilot 360 users and portal end customers.
1273
+ *
1274
+ */
1275
+ export interface ExternalValuesComponent {
1276
+ component_type: "EXTERNAL_VALUES";
1277
+ configuration: /* Configuration for an EXTERNAL_VALUES component */ ExternalValuesConfig;
1278
+ }
1279
+ /**
1280
+ * Configuration for an EXTERNAL_VALUES component
1281
+ */
1282
+ export interface ExternalValuesConfig {
1283
+ /**
1284
+ * Hooks exposed by this component. Hook ids must be unique within the component.
1285
+ */
1286
+ hooks: /**
1287
+ * One external call that returns one or more typed results. Interpolated templates (Liquid) have access to `Input`, `Context`, `Consumer`, `Options`, `Env` and — for `result` templates — `Response` and `AuthResponse`.
1288
+ *
1289
+ */
1290
+ ExternalValuesHook[];
1291
+ }
1292
+ /**
1293
+ * One external call that returns one or more typed results. Interpolated templates (Liquid) have access to `Input`, `Context`, `Consumer`, `Options`, `Env` and — for `result` templates — `Response` and `AuthResponse`.
1294
+ *
1295
+ */
1296
+ export interface ExternalValuesHook {
1297
+ /**
1298
+ * Stable identifier; consumers (e.g. validation rules) reference it. Renaming breaks references.
1299
+ */
1300
+ id: string; // ^[a-zA-Z0-9_-]{1,100}$
1301
+ name: TranslatedString;
1302
+ description?: TranslatedString;
1303
+ /**
1304
+ * Static request authentication applied to the call.
1305
+ * - `none`: no static authentication.
1306
+ * - `header`: sends `auth_secret` in header `auth_header` (default `X-API-Key`).
1307
+ * - `bearer`: sends `Authorization: Bearer <auth_secret>`.
1308
+ * - `hmac`: signs the request per Standard Webhooks (headers `webhook-id`,
1309
+ * `webhook-timestamp`, `webhook-signature` = `v1,<base64 HMAC-SHA256>` over
1310
+ * `<id>.<timestamp>.<body>`) using `auth_secret` as a `whsec_`-prefixed
1311
+ * base64 secret, exactly as epilot webhooks do.
1312
+ *
1313
+ * `auth_secret` is required when `auth_type` is `header`, `bearer` or `hmac`.
1314
+ * Combine with `auth` (a pre-call that fetches a token) when the target needs both.
1315
+ *
1316
+ */
1317
+ auth_type?: "none" | "header" | "bearer" | "hmac";
1318
+ /**
1319
+ * Header name used when `auth_type` is `header`. Defaults to `X-API-Key`.
1320
+ */
1321
+ auth_header?: string;
1322
+ /**
1323
+ * Liquid template resolving to the secret, e.g. "{{Options.api_key}}". Must reference an option declared with `type: secret`; literals are rejected. Required when `auth_type` is `header`, `bearer` or `hmac`.
1324
+ * example:
1325
+ * {{Options.api_key}}
1326
+ */
1327
+ auth_secret?: string;
1328
+ auth?: PortalExtensionAuthBlock;
1329
+ call: {
1330
+ /**
1331
+ * HTTP method to use for the call
1332
+ */
1333
+ method?: "GET" | "POST" | "PUT" | "PATCH";
1334
+ /**
1335
+ * URL to call. Supports variable interpolation.
1336
+ */
1337
+ url: string;
1338
+ /**
1339
+ * Headers to send with the call. Supports variable interpolation.
1340
+ */
1341
+ headers?: {
1342
+ [name: string]: string;
1343
+ };
1344
+ /**
1345
+ * Query parameters to append to the URL. Supports variable interpolation.
1346
+ */
1347
+ params?: {
1348
+ [name: string]: string;
1349
+ };
1350
+ /**
1351
+ * JSON body to send. Values support variable interpolation. When omitted, `{ Input, Context, Consumer }` is sent as-is.
1352
+ */
1353
+ body?: {
1354
+ [name: string]: any;
1355
+ };
1356
+ };
1357
+ /**
1358
+ * Typed results extracted from the response. Result ids must be unique within the hook.
1359
+ */
1360
+ result: [
1361
+ /**
1362
+ * A single typed value extracted from the hook response. Exactly one of `template`, `path` or `jsonata` must be set.
1363
+ *
1364
+ */
1365
+ ExternalValuesResult,
1366
+ .../**
1367
+ * A single typed value extracted from the hook response. Exactly one of `template`, `path` or `jsonata` must be set.
1368
+ *
1369
+ */
1370
+ ExternalValuesResult[]
1371
+ ];
1372
+ /**
1373
+ * Timeout for the external call in milliseconds.
1374
+ */
1375
+ timeout_ms?: number;
1376
+ /**
1377
+ * Behaviour when the external system is unavailable (timeout, network or upstream error). `skip`: consumers ignore conditions depending on this hook. `block`: consumers treat the dependent action as not allowed.
1378
+ */
1379
+ on_unavailable?: "skip" | "block";
1380
+ /**
1381
+ * Response caching. Off when omitted.
1382
+ */
1383
+ cache?: {
1384
+ /**
1385
+ * Time to live in seconds. 0 disables caching.
1386
+ */
1387
+ ttl_seconds: number;
1388
+ /**
1389
+ * Liquid template for the cache key. Defaults to a hash of org, app, hook, `Input` and `Context`.
1390
+ */
1391
+ key?: string;
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
+ secure_proxy?: /* If set, requests are routed through the ERP Integration secure proxy. Mutually exclusive with use_static_ips. */ PortalExtensionSecureProxy;
1398
+ }
1399
+ /**
1400
+ * A single typed value extracted from the hook response. Exactly one of `template`, `path` or `jsonata` must be set.
1401
+ *
1402
+ */
1403
+ export interface ExternalValuesResult {
1404
+ /**
1405
+ * Stable identifier of the result within the hook. Renaming breaks references.
1406
+ */
1407
+ id: string; // ^[a-zA-Z0-9_-]{1,100}$
1408
+ /**
1409
+ * Type the extracted value is coerced to.
1410
+ */
1411
+ type: "number" | "text" | "date" | "boolean";
1412
+ name: TranslatedString;
1413
+ /**
1414
+ * Liquid template over `Response` etc.; output coerced to `type`.
1415
+ * example:
1416
+ * {{Response.value}}
1417
+ */
1418
+ template?: string;
1419
+ /**
1420
+ * Dot path into the response body, e.g. "data.limit".
1421
+ * example:
1422
+ * data.limit
1423
+ */
1424
+ path?: string;
1425
+ /**
1426
+ * JSONata expression over `{ Response, Input, Context, Options, Env }`.
1427
+ * example:
1428
+ * $sum(Response.items.amount)
1429
+ */
1430
+ jsonata?: string;
1431
+ }
1257
1432
  /**
1258
1433
  * A named server-side function belonging to the app. Runs in the epilot code-execution sandbox with an installation-scoped app token. Functions with a schedule are executed automatically once per installation.
1259
1434
  *
@@ -1405,7 +1580,7 @@ declare namespace Components {
1405
1580
  * `configured` and `value_updated_at` instead.
1406
1581
  *
1407
1582
  */
1408
- options?: /* Options for the component configuration */ Options[];
1583
+ options?: /* An option declaration — a setting the installing org fills in. Declared at app level. */ Options[];
1409
1584
  /**
1410
1585
  * Version of the app that is installed
1411
1586
  */
@@ -1618,7 +1793,7 @@ declare namespace Components {
1618
1793
  value: any;
1619
1794
  }
1620
1795
  /**
1621
- * Options for the component configuration
1796
+ * An option declaration — a setting the installing org fills in. Declared at app level.
1622
1797
  */
1623
1798
  export interface Options {
1624
1799
  /**
@@ -1677,7 +1852,7 @@ declare namespace Components {
1677
1852
  * Write-only, server-side only value — like a sensitive environment variable
1678
1853
  * (app-level options only). Sensitive values are never serialized in any response;
1679
1854
  * they are resolvable only via server-side channels (API proxy injection, function
1680
- * `secrets` allowlist, the internal options/resolve endpoint). Non-sensitive values
1855
+ * runs, the internal options/resolve endpoint). Non-sensitive values
1681
1856
  * are readable wherever the app runs, including the end-customer browser (journey and
1682
1857
  * portal runtime). Forced to true for `secret`-touching options. Default: false.
1683
1858
  *
@@ -1855,7 +2030,7 @@ declare namespace Components {
1855
2030
  * { "id": "ht", "label": { "en": "High tariff" }, "aggregation_group": "consumption", "statistical_method": "sum", "unit": "kWh", "color": "primary", "precision": 2 },
1856
2031
  * ...
1857
2032
  * ],
1858
- * "intervals": ["PT15M", "PT1H", "P1D", "P1M"],
2033
+ * "intervals": ["PT15M", "PT1H", "P1D", "P1M", "P1Y"],
1859
2034
  * "data_range": { "from": "2024-01-01T00:00:00Z", "to": "2026-05-01T00:00:00Z" }
1860
2035
  * }
1861
2036
  * 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.
@@ -2098,7 +2273,7 @@ declare namespace Components {
2098
2273
  * Intervals supported by the API. If omitted, it is assumed that all intervals are supported.
2099
2274
  *
2100
2275
  */
2101
- intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M")[];
2276
+ intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y")[];
2102
2277
  auth?: PortalExtensionAuthBlock;
2103
2278
  call: {
2104
2279
  /**
@@ -2269,7 +2444,7 @@ declare namespace Components {
2269
2444
  * Intervals supported by the API. If omitted, it is assumed that all intervals are supported.
2270
2445
  *
2271
2446
  */
2272
- intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M")[];
2447
+ intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y")[];
2273
2448
  auth?: PortalExtensionAuthBlock;
2274
2449
  call: {
2275
2450
  /**
@@ -2600,7 +2775,7 @@ declare namespace Components {
2600
2775
  * Intervals supported by the API. If omitted, it is assumed that all intervals are supported.
2601
2776
  *
2602
2777
  */
2603
- intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M")[];
2778
+ intervals?: ("PT15M" | "PT1H" | "P1D" | "P1M" | "P1Y")[];
2604
2779
  auth?: PortalExtensionAuthBlock;
2605
2780
  call: {
2606
2781
  /**
@@ -2732,7 +2907,7 @@ declare namespace Components {
2732
2907
  * { "id": "ht", "label": { "en": "High tariff" }, "aggregation_group": "consumption", "statistical_method": "sum", "unit": "kWh", "color": "primary", "precision": 2 },
2733
2908
  * ...
2734
2909
  * ],
2735
- * "intervals": ["PT15M", "PT1H", "P1D", "P1M"],
2910
+ * "intervals": ["PT15M", "PT1H", "P1D", "P1M", "P1Y"],
2736
2911
  * "data_range": { "from": "2024-01-01T00:00:00Z", "to": "2026-05-01T00:00:00Z" }
2737
2912
  * }
2738
2913
  * 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.
@@ -2920,7 +3095,7 @@ declare namespace Components {
2920
3095
  /**
2921
3096
  * App-level option declarations (with sensitivity) of this version
2922
3097
  */
2923
- options?: /* Options for the component configuration */ Options[];
3098
+ options?: /* An option declaration — a setting the installing org fills in. Declared at app level. */ Options[];
2924
3099
  /**
2925
3100
  * Flag to indicate if the app is in beta.
2926
3101
  */
@@ -3030,6 +3205,7 @@ declare namespace Paths {
3030
3205
  sourceVersion: Parameters.SourceVersion;
3031
3206
  targetVersion: Parameters.TargetVersion;
3032
3207
  }
3208
+ export type RequestBody = Components.RequestBodies.CloneVersionRequest;
3033
3209
  namespace Responses {
3034
3210
  export interface $201 {
3035
3211
  app_id?: string;
@@ -3613,7 +3789,7 @@ declare namespace Paths {
3613
3789
  }
3614
3790
  namespace Responses {
3615
3791
  export interface $200 {
3616
- options?: /* Options for the component configuration */ Components.Schemas.Options[];
3792
+ options?: /* An option declaration — a setting the installing org fills in. Declared at app level. */ Components.Schemas.Options[];
3617
3793
  }
3618
3794
  export interface $403 {
3619
3795
  }
@@ -3919,7 +4095,7 @@ export interface OperationMethods {
3919
4095
  */
3920
4096
  'cloneVersion'(
3921
4097
  parameters?: Parameters<Paths.CloneVersion.PathParameters> | null,
3922
- data?: any,
4098
+ data?: Paths.CloneVersion.RequestBody,
3923
4099
  config?: AxiosRequestConfig
3924
4100
  ): OperationResponse<Paths.CloneVersion.Responses.$201>
3925
4101
  /**
@@ -4312,7 +4488,7 @@ export interface PathsDictionary {
4312
4488
  */
4313
4489
  'post'(
4314
4490
  parameters?: Parameters<Paths.CloneVersion.PathParameters> | null,
4315
- data?: any,
4491
+ data?: Paths.CloneVersion.RequestBody,
4316
4492
  config?: AxiosRequestConfig
4317
4493
  ): OperationResponse<Paths.CloneVersion.Responses.$201>
4318
4494
  }
@@ -4499,6 +4675,10 @@ export type ExternalProductCatalogComponent = Components.Schemas.ExternalProduct
4499
4675
  export type ExternalProductCatalogConfig = Components.Schemas.ExternalProductCatalogConfig;
4500
4676
  export type ExternalProductCatalogHookProductRecommendations = Components.Schemas.ExternalProductCatalogHookProductRecommendations;
4501
4677
  export type ExternalProductCatalogHookProducts = Components.Schemas.ExternalProductCatalogHookProducts;
4678
+ export type ExternalValuesComponent = Components.Schemas.ExternalValuesComponent;
4679
+ export type ExternalValuesConfig = Components.Schemas.ExternalValuesConfig;
4680
+ export type ExternalValuesHook = Components.Schemas.ExternalValuesHook;
4681
+ export type ExternalValuesResult = Components.Schemas.ExternalValuesResult;
4502
4682
  export type FunctionDefinition = Components.Schemas.FunctionDefinition;
4503
4683
  export type FunctionRefCustomActionConfig = Components.Schemas.FunctionRefCustomActionConfig;
4504
4684
  export type Grants = Components.Schemas.Grants;
package/dist/openapi.json CHANGED
@@ -1150,6 +1150,9 @@
1150
1150
  "description": "Target version to create"
1151
1151
  }
1152
1152
  ],
1153
+ "requestBody": {
1154
+ "$ref": "#/components/requestBodies/CloneVersionRequest"
1155
+ },
1153
1156
  "responses": {
1154
1157
  "201": {
1155
1158
  "description": "New version created successfully",
@@ -1902,6 +1905,28 @@
1902
1905
  "$ref": "#/components/schemas/Options"
1903
1906
  },
1904
1907
  "description": "Replaces the full set of app-level option declarations for this version.\nOption keys must be unique app-wide; `secret`-touching options are always\nsensitive and must not declare `sensitive: false`.\n"
1908
+ },
1909
+ "changelog": {
1910
+ "type": "string",
1911
+ "maxLength": 250,
1912
+ "description": "Short description of what changed in this version"
1913
+ }
1914
+ }
1915
+ }
1916
+ }
1917
+ }
1918
+ },
1919
+ "CloneVersionRequest": {
1920
+ "required": false,
1921
+ "content": {
1922
+ "application/json": {
1923
+ "schema": {
1924
+ "type": "object",
1925
+ "properties": {
1926
+ "changelog": {
1927
+ "type": "string",
1928
+ "maxLength": 250,
1929
+ "description": "Short description of what the new version will change"
1905
1930
  }
1906
1931
  }
1907
1932
  }
@@ -2009,7 +2034,7 @@
2009
2034
  },
2010
2035
  "Options": {
2011
2036
  "type": "object",
2012
- "description": "Options for the component configuration",
2037
+ "description": "An option declaration — a setting the installing org fills in. Declared at app level.",
2013
2038
  "required": [
2014
2039
  "key",
2015
2040
  "type"
@@ -2058,7 +2083,7 @@
2058
2083
  },
2059
2084
  "sensitive": {
2060
2085
  "type": "boolean",
2061
- "description": "Write-only, server-side only value — like a sensitive environment variable\n(app-level options only). Sensitive values are never serialized in any response;\nthey are resolvable only via server-side channels (API proxy injection, function\n`secrets` allowlist, the internal options/resolve endpoint). Non-sensitive values\nare readable wherever the app runs, including the end-customer browser (journey and\nportal runtime). Forced to true for `secret`-touching options. Default: false.\n"
2086
+ "description": "Write-only, server-side only value — like a sensitive environment variable\n(app-level options only). Sensitive values are never serialized in any response;\nthey are resolvable only via server-side channels (API proxy injection, function\nruns, the internal options/resolve endpoint). Non-sensitive values\nare readable wherever the app runs, including the end-customer browser (journey and\nportal runtime). Forced to true for `secret`-touching options. Default: false.\n"
2062
2087
  },
2063
2088
  "configured": {
2064
2089
  "type": "boolean",
@@ -2179,6 +2204,7 @@
2179
2204
  "EXTERNAL_PRODUCT_CATALOG",
2180
2205
  "CUSTOM_PAGE",
2181
2206
  "API_PROXY",
2207
+ "EXTERNAL_VALUES",
2182
2208
  "APP_FUNCTION"
2183
2209
  ],
2184
2210
  "description": "Type of app component"
@@ -2375,7 +2401,8 @@
2375
2401
  "CUSTOM_CAPABILITY": "#/components/schemas/CustomCapabilityComponent",
2376
2402
  "EXTERNAL_PRODUCT_CATALOG": "#/components/schemas/ExternalProductCatalogComponent",
2377
2403
  "CUSTOM_PAGE": "#/components/schemas/CustomPageComponent",
2378
- "API_PROXY": "#/components/schemas/ApiProxyComponent"
2404
+ "API_PROXY": "#/components/schemas/ApiProxyComponent",
2405
+ "EXTERNAL_VALUES": "#/components/schemas/ExternalValuesComponent"
2379
2406
  }
2380
2407
  },
2381
2408
  "oneOf": [
@@ -2405,6 +2432,9 @@
2405
2432
  },
2406
2433
  {
2407
2434
  "$ref": "#/components/schemas/ApiProxyComponent"
2435
+ },
2436
+ {
2437
+ "$ref": "#/components/schemas/ExternalValuesComponent"
2408
2438
  }
2409
2439
  ]
2410
2440
  }
@@ -2428,6 +2458,25 @@
2428
2458
  }
2429
2459
  }
2430
2460
  },
2461
+ "ExternalValuesComponent": {
2462
+ "type": "object",
2463
+ "description": "Exposes typed values resolved from an external system at runtime (e.g. a meter reading prediction). Consumers such as validation rules reference a hook and one of its results by id. Resolution is performed by the external-values-api on behalf of authenticated epilot 360 users and portal end customers.\n",
2464
+ "required": [
2465
+ "component_type",
2466
+ "configuration"
2467
+ ],
2468
+ "properties": {
2469
+ "component_type": {
2470
+ "type": "string",
2471
+ "enum": [
2472
+ "EXTERNAL_VALUES"
2473
+ ]
2474
+ },
2475
+ "configuration": {
2476
+ "$ref": "#/components/schemas/ExternalValuesConfig"
2477
+ }
2478
+ }
2479
+ },
2431
2480
  "CustomCapabilityComponent": {
2432
2481
  "type": "object",
2433
2482
  "required": [
@@ -3375,7 +3424,8 @@
3375
3424
  "PT15M",
3376
3425
  "PT1H",
3377
3426
  "P1D",
3378
- "P1M"
3427
+ "P1M",
3428
+ "P1Y"
3379
3429
  ]
3380
3430
  }
3381
3431
  },
@@ -3486,7 +3536,8 @@
3486
3536
  "PT15M",
3487
3537
  "PT1H",
3488
3538
  "P1D",
3489
- "P1M"
3539
+ "P1M",
3540
+ "P1Y"
3490
3541
  ]
3491
3542
  }
3492
3543
  },
@@ -3665,7 +3716,7 @@
3665
3716
  "additionalProperties": false
3666
3717
  },
3667
3718
  "PortalExtensionHookVisualizationMetadata": {
3668
- "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\"],\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",
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",
3669
3720
  "type": "object",
3670
3721
  "properties": {
3671
3722
  "id": {
@@ -3789,7 +3840,8 @@
3789
3840
  "PT15M",
3790
3841
  "PT1H",
3791
3842
  "P1D",
3792
- "P1M"
3843
+ "P1M",
3844
+ "P1Y"
3793
3845
  ]
3794
3846
  }
3795
3847
  },
@@ -5079,6 +5131,204 @@
5079
5131
  }
5080
5132
  }
5081
5133
  },
5134
+ "ExternalValuesConfig": {
5135
+ "type": "object",
5136
+ "description": "Configuration for an EXTERNAL_VALUES component",
5137
+ "required": [
5138
+ "hooks"
5139
+ ],
5140
+ "properties": {
5141
+ "hooks": {
5142
+ "type": "array",
5143
+ "description": "Hooks exposed by this component. Hook ids must be unique within the component.",
5144
+ "items": {
5145
+ "$ref": "#/components/schemas/ExternalValuesHook"
5146
+ }
5147
+ }
5148
+ }
5149
+ },
5150
+ "ExternalValuesHook": {
5151
+ "type": "object",
5152
+ "description": "One external call that returns one or more typed results. Interpolated templates (Liquid) have access to `Input`, `Context`, `Consumer`, `Options`, `Env` and — for `result` templates — `Response` and `AuthResponse`.\n",
5153
+ "required": [
5154
+ "id",
5155
+ "name",
5156
+ "call",
5157
+ "result"
5158
+ ],
5159
+ "properties": {
5160
+ "id": {
5161
+ "type": "string",
5162
+ "pattern": "^[a-zA-Z0-9_-]{1,100}$",
5163
+ "description": "Stable identifier; consumers (e.g. validation rules) reference it. Renaming breaks references."
5164
+ },
5165
+ "name": {
5166
+ "$ref": "#/components/schemas/TranslatedString"
5167
+ },
5168
+ "description": {
5169
+ "$ref": "#/components/schemas/TranslatedString"
5170
+ },
5171
+ "auth_type": {
5172
+ "type": "string",
5173
+ "enum": [
5174
+ "none",
5175
+ "header",
5176
+ "bearer",
5177
+ "hmac"
5178
+ ],
5179
+ "default": "none",
5180
+ "description": "Static request authentication applied to the call.\n- `none`: no static authentication.\n- `header`: sends `auth_secret` in header `auth_header` (default `X-API-Key`).\n- `bearer`: sends `Authorization: Bearer <auth_secret>`.\n- `hmac`: signs the request per Standard Webhooks (headers `webhook-id`,\n `webhook-timestamp`, `webhook-signature` = `v1,<base64 HMAC-SHA256>` over\n `<id>.<timestamp>.<body>`) using `auth_secret` as a `whsec_`-prefixed\n base64 secret, exactly as epilot webhooks do.\n\n`auth_secret` is required when `auth_type` is `header`, `bearer` or `hmac`.\nCombine with `auth` (a pre-call that fetches a token) when the target needs both.\n"
5181
+ },
5182
+ "auth_header": {
5183
+ "type": "string",
5184
+ "description": "Header name used when `auth_type` is `header`. Defaults to `X-API-Key`."
5185
+ },
5186
+ "auth_secret": {
5187
+ "type": "string",
5188
+ "description": "Liquid template resolving to the secret, e.g. \"{{Options.api_key}}\". Must reference an option declared with `type: secret`; literals are rejected. Required when `auth_type` is `header`, `bearer` or `hmac`.",
5189
+ "example": "{{Options.api_key}}"
5190
+ },
5191
+ "auth": {
5192
+ "$ref": "#/components/schemas/PortalExtensionAuthBlock"
5193
+ },
5194
+ "call": {
5195
+ "type": "object",
5196
+ "required": [
5197
+ "url"
5198
+ ],
5199
+ "properties": {
5200
+ "method": {
5201
+ "type": "string",
5202
+ "enum": [
5203
+ "GET",
5204
+ "POST",
5205
+ "PUT",
5206
+ "PATCH"
5207
+ ],
5208
+ "default": "POST",
5209
+ "description": "HTTP method to use for the call"
5210
+ },
5211
+ "url": {
5212
+ "type": "string",
5213
+ "description": "URL to call. Supports variable interpolation."
5214
+ },
5215
+ "headers": {
5216
+ "type": "object",
5217
+ "description": "Headers to send with the call. Supports variable interpolation.",
5218
+ "additionalProperties": {
5219
+ "type": "string"
5220
+ }
5221
+ },
5222
+ "params": {
5223
+ "type": "object",
5224
+ "description": "Query parameters to append to the URL. Supports variable interpolation.",
5225
+ "additionalProperties": {
5226
+ "type": "string"
5227
+ }
5228
+ },
5229
+ "body": {
5230
+ "type": "object",
5231
+ "description": "JSON body to send. Values support variable interpolation. When omitted, `{ Input, Context, Consumer }` is sent as-is.",
5232
+ "additionalProperties": true
5233
+ }
5234
+ }
5235
+ },
5236
+ "result": {
5237
+ "type": "array",
5238
+ "minItems": 1,
5239
+ "description": "Typed results extracted from the response. Result ids must be unique within the hook.",
5240
+ "items": {
5241
+ "$ref": "#/components/schemas/ExternalValuesResult"
5242
+ }
5243
+ },
5244
+ "timeout_ms": {
5245
+ "type": "integer",
5246
+ "minimum": 500,
5247
+ "maximum": 5000,
5248
+ "default": 3000,
5249
+ "description": "Timeout for the external call in milliseconds."
5250
+ },
5251
+ "on_unavailable": {
5252
+ "type": "string",
5253
+ "enum": [
5254
+ "skip",
5255
+ "block"
5256
+ ],
5257
+ "default": "skip",
5258
+ "description": "Behaviour when the external system is unavailable (timeout, network or upstream error). `skip`: consumers ignore conditions depending on this hook. `block`: consumers treat the dependent action as not allowed."
5259
+ },
5260
+ "cache": {
5261
+ "type": "object",
5262
+ "description": "Response caching. Off when omitted.",
5263
+ "required": [
5264
+ "ttl_seconds"
5265
+ ],
5266
+ "properties": {
5267
+ "ttl_seconds": {
5268
+ "type": "integer",
5269
+ "minimum": 0,
5270
+ "maximum": 3600,
5271
+ "description": "Time to live in seconds. 0 disables caching."
5272
+ },
5273
+ "key": {
5274
+ "type": "string",
5275
+ "description": "Liquid template for the cache key. Defaults to a hash of org, app, hook, `Input` and `Context`."
5276
+ }
5277
+ }
5278
+ },
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
+ "secure_proxy": {
5284
+ "$ref": "#/components/schemas/PortalExtensionSecureProxy"
5285
+ }
5286
+ }
5287
+ },
5288
+ "ExternalValuesResult": {
5289
+ "type": "object",
5290
+ "description": "A single typed value extracted from the hook response. Exactly one of `template`, `path` or `jsonata` must be set.\n",
5291
+ "required": [
5292
+ "id",
5293
+ "type",
5294
+ "name"
5295
+ ],
5296
+ "properties": {
5297
+ "id": {
5298
+ "type": "string",
5299
+ "pattern": "^[a-zA-Z0-9_-]{1,100}$",
5300
+ "description": "Stable identifier of the result within the hook. Renaming breaks references."
5301
+ },
5302
+ "type": {
5303
+ "type": "string",
5304
+ "enum": [
5305
+ "number",
5306
+ "text",
5307
+ "date",
5308
+ "boolean"
5309
+ ],
5310
+ "description": "Type the extracted value is coerced to."
5311
+ },
5312
+ "name": {
5313
+ "$ref": "#/components/schemas/TranslatedString"
5314
+ },
5315
+ "template": {
5316
+ "type": "string",
5317
+ "description": "Liquid template over `Response` etc.; output coerced to `type`.",
5318
+ "example": "{{Response.value}}"
5319
+ },
5320
+ "path": {
5321
+ "type": "string",
5322
+ "description": "Dot path into the response body, e.g. \"data.limit\".",
5323
+ "example": "data.limit"
5324
+ },
5325
+ "jsonata": {
5326
+ "type": "string",
5327
+ "description": "JSONata expression over `{ Response, Input, Context, Options, Env }`.",
5328
+ "example": "$sum(Response.items.amount)"
5329
+ }
5330
+ }
5331
+ },
5082
5332
  "Grants": {
5083
5333
  "type": "array",
5084
5334
  "description": "Required grants for the app in order to call APIs for the installing tenant",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.14.1",
3
+ "version": "0.16.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",