@epilot/app-client 0.13.7 → 0.14.1

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-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"}],"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={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})})();
@@ -490,6 +490,24 @@
490
490
  "responses": {}
491
491
  }
492
492
  },
493
+ "/v1/app/{appId}/options/resolve": {
494
+ "post": {
495
+ "operationId": "resolveOptions",
496
+ "parameters": [
497
+ {
498
+ "name": "appId",
499
+ "in": "path",
500
+ "required": true
501
+ }
502
+ ],
503
+ "requestBody": {
504
+ "content": {
505
+ "application/json": {}
506
+ }
507
+ },
508
+ "responses": {}
509
+ }
510
+ },
493
511
  "/v1/app-events": {
494
512
  "post": {
495
513
  "operationId": "ingestEvent",
@@ -521,6 +539,14 @@
521
539
  "in": "path",
522
540
  "required": true,
523
541
  "description": "Path to forward to the proxy target"
542
+ },
543
+ {
544
+ "name": "query",
545
+ "in": "query",
546
+ "required": false,
547
+ "style": "form",
548
+ "explode": true,
549
+ "description": "Free-form query parameters, forwarded unchanged to the proxy target"
524
550
  }
525
551
  ],
526
552
  "get": {
package/dist/openapi.d.ts CHANGED
@@ -105,6 +105,21 @@ declare namespace Components {
105
105
  */
106
106
  role_id?: string | null;
107
107
  grants?: /* Required grants for the app in order to call APIs for the installing tenant */ Schemas.Grants;
108
+ /**
109
+ * Replaces the full set of server-side functions for this version
110
+ */
111
+ functions?: /**
112
+ * 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.
113
+ *
114
+ */
115
+ Schemas.FunctionDefinition[];
116
+ /**
117
+ * Replaces the full set of app-level option declarations for this version.
118
+ * Option keys must be unique app-wide; `secret`-touching options are always
119
+ * sensitive and must not declare `sensitive: false`.
120
+ *
121
+ */
122
+ options?: /* Options for the component configuration */ Schemas.Options[];
108
123
  }
109
124
  export type UpsertComponentRequest = Schemas.BaseComponent;
110
125
  }
@@ -155,9 +170,9 @@ declare namespace Components {
155
170
  */
156
171
  target: string; // ^https://
157
172
  /**
158
- * Authentication strategy
173
+ * Authentication strategy. 'basic' sends an HTTP Basic Authorization header built server-side from the 'username' and 'password' component options.
159
174
  */
160
- auth_type: "header" | "bearer" | "oauth2" | "none";
175
+ auth_type: "header" | "bearer" | "basic" | "oauth2" | "none";
161
176
  /**
162
177
  * Header name for 'header' auth type
163
178
  */
@@ -277,6 +292,15 @@ declare namespace Components {
277
292
  * List of options for the app component
278
293
  */
279
294
  options?: /* Options for the component configuration */ Options[];
295
+ /**
296
+ * Keys of app-level options this component uses. Narrows which options are
297
+ * folded back into `options` for legacy consumers (e.g. which values a journey
298
+ * block receives in its public args) — a scoping hint, never a security
299
+ * boundary. Stamped automatically by the component-options migration; may also
300
+ * be declared by the app developer.
301
+ *
302
+ */
303
+ uses_options?: string[];
280
304
  surfaces?: {
281
305
  [key: string]: any;
282
306
  };
@@ -316,6 +340,15 @@ declare namespace Components {
316
340
  * List of options for the app component
317
341
  */
318
342
  options?: /* Options for the component configuration */ Options[];
343
+ /**
344
+ * Keys of app-level options this component uses. Narrows which options are
345
+ * folded back into `options` for legacy consumers (e.g. which values a journey
346
+ * block receives in its public args) — a scoping hint, never a security
347
+ * boundary. Stamped automatically by the component-options migration; may also
348
+ * be declared by the app developer.
349
+ *
350
+ */
351
+ uses_options?: string[];
319
352
  surfaces?: {
320
353
  [key: string]: any;
321
354
  };
@@ -504,7 +537,7 @@ declare namespace Components {
504
537
  /**
505
538
  * Type of app component
506
539
  */
507
- 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";
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";
508
541
  /**
509
542
  * Configuration of the published app
510
543
  */
@@ -612,6 +645,18 @@ declare namespace Components {
612
645
  updated_by?: string;
613
646
  };
614
647
  components: BaseComponent[];
648
+ /**
649
+ * Server-side functions of the app, including scheduled functions
650
+ */
651
+ functions?: /**
652
+ * 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.
653
+ *
654
+ */
655
+ FunctionDefinition[];
656
+ /**
657
+ * App-level option declarations (with sensitivity) of this version
658
+ */
659
+ options?: /* Options for the component configuration */ Options[];
615
660
  /**
616
661
  * Visibility of the app version
617
662
  */
@@ -790,6 +835,18 @@ declare namespace Components {
790
835
  */
791
836
  owner_org_id: string;
792
837
  components: BaseComponent[];
838
+ /**
839
+ * Server-side functions of the app, including scheduled functions
840
+ */
841
+ functions?: /**
842
+ * 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.
843
+ *
844
+ */
845
+ FunctionDefinition[];
846
+ /**
847
+ * App-level option declarations (with sensitivity) of this version
848
+ */
849
+ options?: /* Options for the component configuration */ Options[];
793
850
  /**
794
851
  * Visibility of the app version
795
852
  */
@@ -869,12 +926,24 @@ declare namespace Components {
869
926
  }
870
927
  export interface CustomFlowActionComponent {
871
928
  component_type: "CUSTOM_FLOW_ACTION";
872
- configuration: CustomFlowConfig;
929
+ configuration: /**
930
+ * Configuration of a flow action component. `external_integration` calls an external HTTP endpoint; `function` runs a workflow-type app function in the epilot sandbox.
931
+ *
932
+ */
933
+ CustomFlowConfig;
873
934
  surfaces?: {
874
935
  flow_action_config?: AppBridgeSurfaceConfig;
875
936
  };
876
937
  }
877
- export type CustomFlowConfig = ExternalIntegrationCustomActionConfig | SandboxCustomActionConfig;
938
+ /**
939
+ * Configuration of a flow action component. `external_integration` calls an external HTTP endpoint; `function` runs a workflow-type app function in the epilot sandbox.
940
+ *
941
+ */
942
+ export type CustomFlowConfig = /**
943
+ * Configuration of a flow action component. `external_integration` calls an external HTTP endpoint; `function` runs a workflow-type app function in the epilot sandbox.
944
+ *
945
+ */
946
+ ExternalIntegrationCustomActionConfig | FunctionRefCustomActionConfig;
878
947
  export interface CustomPageComponent {
879
948
  component_type: "CUSTOM_PAGE";
880
949
  configuration: CustomPageConfig;
@@ -997,6 +1066,10 @@ declare namespace Components {
997
1066
  * Filter by correlation ID for tracing
998
1067
  */
999
1068
  correlation_id?: string;
1069
+ /**
1070
+ * Case-insensitive substring match over event details and component id
1071
+ */
1072
+ search?: string;
1000
1073
  };
1001
1074
  aggregation?: {
1002
1075
  /**
@@ -1011,6 +1084,11 @@ declare namespace Components {
1011
1084
  pagination?: {
1012
1085
  page?: number;
1013
1086
  page_size?: number;
1087
+ /**
1088
+ * Cursor: only return events strictly older than this timestamp. Use the timestamp of the last received event to fetch the next page; more efficient than increasing page/page_size.
1089
+ *
1090
+ */
1091
+ before?: string; // date-time
1014
1092
  };
1015
1093
  sort?: {
1016
1094
  field?: "timestamp" | "event_type" | "component_id";
@@ -1176,6 +1254,93 @@ declare namespace Components {
1176
1254
  };
1177
1255
  };
1178
1256
  }
1257
+ /**
1258
+ * 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
+ *
1260
+ */
1261
+ export interface FunctionDefinition {
1262
+ /**
1263
+ * Unique function name within the app
1264
+ */
1265
+ name: string; // ^[a-z0-9][a-z0-9-]{0,63}$
1266
+ /**
1267
+ * Where the function can be used. `workflow` functions are referenced by CUSTOM_FLOW_ACTION components (type `function`) and run with entity context. `scheduled` functions run automatically per installation on their cron schedule.
1268
+ *
1269
+ */
1270
+ type: "workflow" | "scheduled";
1271
+ /**
1272
+ * Human-readable display name of the function, shown to installing organizations (e.g. in the scheduled-functions summary)
1273
+ *
1274
+ */
1275
+ label?: {
1276
+ /**
1277
+ * English translation
1278
+ */
1279
+ en?: string | null;
1280
+ /**
1281
+ * German translation
1282
+ */
1283
+ de: string;
1284
+ };
1285
+ /**
1286
+ * Description of the function
1287
+ */
1288
+ description?: {
1289
+ /**
1290
+ * English translation
1291
+ */
1292
+ en?: string | null;
1293
+ /**
1294
+ * German translation
1295
+ */
1296
+ de: string;
1297
+ };
1298
+ /**
1299
+ * 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.
1300
+ *
1301
+ */
1302
+ code: string;
1303
+ /**
1304
+ * Cron trigger for the function, executed once per installation. Standard 5-field cron expression (e.g. "0 3 * * *") or rate expression (e.g. "rate(30 minutes)"). Minimum interval: 15 minutes. Scheduled runs are limited to 60 seconds.
1305
+ *
1306
+ * example:
1307
+ * rate(30 minutes)
1308
+ */
1309
+ schedule?: string;
1310
+ /**
1311
+ * IANA timezone the cron expression is evaluated in
1312
+ */
1313
+ schedule_timezone?: string;
1314
+ /**
1315
+ * Behavior when the previous scheduled run is still active
1316
+ */
1317
+ schedule_overlap?: "skip";
1318
+ /**
1319
+ * DEPRECATED and ignored — functions receive the app's full effective option keyspace (sensitive values included) via input.app_options. Kept for manifest compatibility.
1320
+ *
1321
+ */
1322
+ secrets?: string[];
1323
+ }
1324
+ export interface FunctionRefCustomActionConfig {
1325
+ /**
1326
+ * Name of the custom action
1327
+ */
1328
+ name?: string;
1329
+ /**
1330
+ * Description of the custom action
1331
+ */
1332
+ description?: string;
1333
+ /**
1334
+ * Wait for callback_url to be called before completing the action
1335
+ */
1336
+ wait_for_callback?: boolean;
1337
+ type: "function";
1338
+ /**
1339
+ * Name of a `workflow`-type function of the same app version. The component provides the org-facing contract (name, options, config surface); the referenced function provides the code.
1340
+ *
1341
+ */
1342
+ function_name: string;
1343
+ }
1179
1344
  /**
1180
1345
  * Required grants for the app in order to call APIs for the installing tenant
1181
1346
  */
@@ -1213,6 +1378,10 @@ declare namespace Components {
1213
1378
  * Name of the app
1214
1379
  */
1215
1380
  name: string;
1381
+ /**
1382
+ * Public URL of the app logo, if one has been uploaded
1383
+ */
1384
+ icon_url?: string;
1216
1385
  /**
1217
1386
  * Configuration values for the app components
1218
1387
  */
@@ -1221,6 +1390,22 @@ declare namespace Components {
1221
1390
  * List of component configurations for the installed version
1222
1391
  */
1223
1392
  components: BaseComponent[];
1393
+ /**
1394
+ * Server-side functions of the installed version, including scheduled functions
1395
+ */
1396
+ functions?: /**
1397
+ * 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.
1398
+ *
1399
+ */
1400
+ FunctionDefinition[];
1401
+ /**
1402
+ * Effective app-level options of the installation: declared top-level options plus
1403
+ * component-level options lifted to the app keyspace, each with its configured
1404
+ * `value`. Values of sensitive options (secrets) are never included — they carry
1405
+ * `configured` and `value_updated_at` instead.
1406
+ *
1407
+ */
1408
+ options?: /* Options for the component configuration */ Options[];
1224
1409
  /**
1225
1410
  * Version of the app that is installed
1226
1411
  */
@@ -1256,6 +1441,55 @@ declare namespace Components {
1256
1441
  */
1257
1442
  _manifest?: string /* uuid */[];
1258
1443
  }
1444
+ /**
1445
+ * Review entry including app ownership info, used by internal admin endpoints
1446
+ */
1447
+ export interface InternalReview {
1448
+ /**
1449
+ * Version of the app that is under review
1450
+ */
1451
+ version?: string;
1452
+ /**
1453
+ * Status of the review
1454
+ */
1455
+ review_status?: "approved" | "rejected" | "pending";
1456
+ /**
1457
+ * Timestamp of the review
1458
+ */
1459
+ requested_at?: string;
1460
+ /**
1461
+ * User ID of the reviewer
1462
+ */
1463
+ requested_by?: string;
1464
+ /**
1465
+ * Email of the technical contact
1466
+ */
1467
+ technical_contact?: string;
1468
+ /**
1469
+ * Email of the marketing contact
1470
+ */
1471
+ marketing_contact?: string;
1472
+ /**
1473
+ * URL of the demo
1474
+ */
1475
+ demo_url?: string;
1476
+ /**
1477
+ * ID of the app configuration
1478
+ */
1479
+ app_id?: string;
1480
+ /**
1481
+ * Organization ID of the app owner
1482
+ */
1483
+ org_id?: string;
1484
+ /**
1485
+ * Identity of the internal reviewer who approved the review
1486
+ */
1487
+ reviewed_by?: string;
1488
+ /**
1489
+ * Timestamp of the approval
1490
+ */
1491
+ reviewed_at?: string;
1492
+ }
1259
1493
  export interface JourneyBlockComponent {
1260
1494
  component_type: "CUSTOM_JOURNEY_BLOCK";
1261
1495
  configuration: JourneyBlockConfig;
@@ -1439,10 +1673,42 @@ declare namespace Components {
1439
1673
  *
1440
1674
  */
1441
1675
  type: "text" | "number" | "boolean" | "secret" | "object";
1676
+ /**
1677
+ * Write-only, server-side only value — like a sensitive environment variable
1678
+ * (app-level options only). Sensitive values are never serialized in any response;
1679
+ * they are resolvable only via server-side channels (API proxy injection, function
1680
+ * `secrets` allowlist, the internal options/resolve endpoint). Non-sensitive values
1681
+ * are readable wherever the app runs, including the end-customer browser (journey and
1682
+ * portal runtime). Forced to true for `secret`-touching options. Default: false.
1683
+ *
1684
+ */
1685
+ sensitive?: boolean;
1686
+ /**
1687
+ * Serialized instead of `value` for sensitive options (secrets): true when a
1688
+ * value is stored.
1689
+ *
1690
+ */
1691
+ configured?: boolean;
1692
+ /**
1693
+ * Compatibility marker: this option is declared at app level and folded back
1694
+ * into the component's options so existing consumers (journey runtime, portal
1695
+ * blocks, older services) keep working unchanged. New consumers should read
1696
+ * app-level options from the installation's `options` array instead.
1697
+ *
1698
+ */
1699
+ lifted?: boolean;
1700
+ /**
1701
+ * Timestamp of the last value change. Only returned for sensitive options
1702
+ * (alongside `configured`) so installers can see when a secret was last rotated.
1703
+ *
1704
+ */
1705
+ value_updated_at?: string;
1442
1706
  }
1443
1707
  export interface OptionsRef {
1444
1708
  /**
1445
- * ID of the component these values are for
1709
+ * ID of the component these values are for. Use the sentinel `$app` for
1710
+ * app-level option values (options declared at the manifest top level).
1711
+ *
1446
1712
  */
1447
1713
  component_id: string;
1448
1714
  options: Option[];
@@ -2643,6 +2909,18 @@ declare namespace Components {
2643
2909
  billing_frequency?: /* How often the subscription is billed */ BillingFrequency;
2644
2910
  };
2645
2911
  components: BaseComponent[];
2912
+ /**
2913
+ * Server-side functions of the app, including scheduled functions
2914
+ */
2915
+ functions?: /**
2916
+ * 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.
2917
+ *
2918
+ */
2919
+ FunctionDefinition[];
2920
+ /**
2921
+ * App-level option declarations (with sensitivity) of this version
2922
+ */
2923
+ options?: /* Options for the component configuration */ Options[];
2646
2924
  /**
2647
2925
  * Flag to indicate if the app is in beta.
2648
2926
  */
@@ -2725,28 +3003,6 @@ declare namespace Components {
2725
3003
  */
2726
3004
  key: string;
2727
3005
  }
2728
- export interface SandboxCustomActionConfig {
2729
- /**
2730
- * Name of the custom action
2731
- */
2732
- name?: string;
2733
- /**
2734
- * Description of the custom action
2735
- */
2736
- description?: string;
2737
- /**
2738
- * Wait for callback_url to be called before completing the action
2739
- */
2740
- wait_for_callback?: boolean;
2741
- type: "sandbox";
2742
- sandbox_settings?: {
2743
- /**
2744
- * JavaScript code to execute for the sandbox action. Maximum size: 300KB (hard limit). Code is stored as raw JavaScript and will be syntax-validated on save. Security restrictions: eval() and Function() constructor are not allowed.
2745
- *
2746
- */
2747
- code?: string;
2748
- };
2749
- }
2750
3006
  export interface TextArg {
2751
3007
  type?: "text";
2752
3008
  }
@@ -3342,6 +3598,29 @@ declare namespace Paths {
3342
3598
  }
3343
3599
  }
3344
3600
  }
3601
+ namespace ResolveOptions {
3602
+ namespace Parameters {
3603
+ export type AppId = string;
3604
+ }
3605
+ export interface PathParameters {
3606
+ appId: Parameters.AppId;
3607
+ }
3608
+ export interface RequestBody {
3609
+ /**
3610
+ * Narrow the response to these option keys
3611
+ */
3612
+ keys?: string[];
3613
+ }
3614
+ namespace Responses {
3615
+ export interface $200 {
3616
+ options?: /* Options for the component configuration */ Components.Schemas.Options[];
3617
+ }
3618
+ export interface $403 {
3619
+ }
3620
+ export interface $404 {
3621
+ }
3622
+ }
3623
+ }
3345
3624
  namespace Uninstall {
3346
3625
  namespace Parameters {
3347
3626
  export type AppId = string;
@@ -3395,12 +3674,18 @@ declare namespace Paths {
3395
3674
  export type AppId = string;
3396
3675
  export type Path = string;
3397
3676
  export type ProxyName = string;
3677
+ export interface Query {
3678
+ [name: string]: any;
3679
+ }
3398
3680
  }
3399
3681
  export interface PathParameters {
3400
3682
  appId: Parameters.AppId;
3401
3683
  proxyName: Parameters.ProxyName;
3402
3684
  path: Parameters.Path;
3403
3685
  }
3686
+ export interface QueryParameters {
3687
+ query?: Parameters.Query;
3688
+ }
3404
3689
  }
3405
3690
  }
3406
3691
 
@@ -3697,6 +3982,16 @@ export interface OperationMethods {
3697
3982
  data?: any,
3698
3983
  config?: AxiosRequestConfig
3699
3984
  ): OperationResponse<Paths.PromoteVersion.Responses.$200>
3985
+ /**
3986
+ * resolveOptions - resolveOptions
3987
+ *
3988
+ * Resolve the effective app-level options of an installation, including decrypted sensitive values (secrets). This endpoint accepts epilot internal-auth tokens exclusively (internal service calls, e.g. automation-workers or the customer portal API) — no user token, API key, or app token can call it, regardless of roles. Every call is audit-logged with the caller identity.
3989
+ */
3990
+ 'resolveOptions'(
3991
+ parameters?: Parameters<Paths.ResolveOptions.PathParameters> | null,
3992
+ data?: Paths.ResolveOptions.RequestBody,
3993
+ config?: AxiosRequestConfig
3994
+ ): OperationResponse<Paths.ResolveOptions.Responses.$200>
3700
3995
  /**
3701
3996
  * ingestEvent - ingestEvent
3702
3997
  *
@@ -3713,7 +4008,7 @@ export interface OperationMethods {
3713
4008
  * Forward a GET request to a registered proxy target from a public-facing component (e.g. journey blocks)
3714
4009
  */
3715
4010
  'publicProxyGet'(
3716
- parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
4011
+ parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.QueryParameters & Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
3717
4012
  data?: any,
3718
4013
  config?: AxiosRequestConfig
3719
4014
  ): OperationResponse<Paths.PublicProxyGet.Responses.$200>
@@ -3723,7 +4018,7 @@ export interface OperationMethods {
3723
4018
  * Forward a PUT request to a registered proxy target from a public-facing component
3724
4019
  */
3725
4020
  'publicProxyPut'(
3726
- parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
4021
+ parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.QueryParameters & Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
3727
4022
  data?: Paths.PublicProxyPut.RequestBody,
3728
4023
  config?: AxiosRequestConfig
3729
4024
  ): OperationResponse<Paths.PublicProxyPut.Responses.$200>
@@ -3733,7 +4028,7 @@ export interface OperationMethods {
3733
4028
  * Forward a POST request to a registered proxy target from a public-facing component (e.g. journey blocks)
3734
4029
  */
3735
4030
  'publicProxyPost'(
3736
- parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
4031
+ parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.QueryParameters & Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
3737
4032
  data?: Paths.PublicProxyPost.RequestBody,
3738
4033
  config?: AxiosRequestConfig
3739
4034
  ): OperationResponse<Paths.PublicProxyPost.Responses.$200>
@@ -3743,7 +4038,7 @@ export interface OperationMethods {
3743
4038
  * Forward a PATCH request to a registered proxy target from a public-facing component
3744
4039
  */
3745
4040
  'publicProxyPatch'(
3746
- parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
4041
+ parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.QueryParameters & Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
3747
4042
  data?: Paths.PublicProxyPatch.RequestBody,
3748
4043
  config?: AxiosRequestConfig
3749
4044
  ): OperationResponse<Paths.PublicProxyPatch.Responses.$200>
@@ -3753,7 +4048,7 @@ export interface OperationMethods {
3753
4048
  * Forward a DELETE request to a registered proxy target from a public-facing component
3754
4049
  */
3755
4050
  'publicProxyDelete'(
3756
- parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
4051
+ parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.QueryParameters & Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
3757
4052
  data?: any,
3758
4053
  config?: AxiosRequestConfig
3759
4054
  ): OperationResponse<Paths.PublicProxyDelete.Responses.$200>
@@ -4087,6 +4382,18 @@ export interface PathsDictionary {
4087
4382
  config?: AxiosRequestConfig
4088
4383
  ): OperationResponse<Paths.PromoteVersion.Responses.$200>
4089
4384
  }
4385
+ ['/v1/app/{appId}/options/resolve']: {
4386
+ /**
4387
+ * resolveOptions - resolveOptions
4388
+ *
4389
+ * Resolve the effective app-level options of an installation, including decrypted sensitive values (secrets). This endpoint accepts epilot internal-auth tokens exclusively (internal service calls, e.g. automation-workers or the customer portal API) — no user token, API key, or app token can call it, regardless of roles. Every call is audit-logged with the caller identity.
4390
+ */
4391
+ 'post'(
4392
+ parameters?: Parameters<Paths.ResolveOptions.PathParameters> | null,
4393
+ data?: Paths.ResolveOptions.RequestBody,
4394
+ config?: AxiosRequestConfig
4395
+ ): OperationResponse<Paths.ResolveOptions.Responses.$200>
4396
+ }
4090
4397
  ['/v1/app-events']: {
4091
4398
  /**
4092
4399
  * ingestEvent - ingestEvent
@@ -4106,7 +4413,7 @@ export interface PathsDictionary {
4106
4413
  * Forward a GET request to a registered proxy target from a public-facing component (e.g. journey blocks)
4107
4414
  */
4108
4415
  'get'(
4109
- parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
4416
+ parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.QueryParameters & Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
4110
4417
  data?: any,
4111
4418
  config?: AxiosRequestConfig
4112
4419
  ): OperationResponse<Paths.PublicProxyGet.Responses.$200>
@@ -4116,7 +4423,7 @@ export interface PathsDictionary {
4116
4423
  * Forward a POST request to a registered proxy target from a public-facing component (e.g. journey blocks)
4117
4424
  */
4118
4425
  'post'(
4119
- parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
4426
+ parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.QueryParameters & Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
4120
4427
  data?: Paths.PublicProxyPost.RequestBody,
4121
4428
  config?: AxiosRequestConfig
4122
4429
  ): OperationResponse<Paths.PublicProxyPost.Responses.$200>
@@ -4126,7 +4433,7 @@ export interface PathsDictionary {
4126
4433
  * Forward a PUT request to a registered proxy target from a public-facing component
4127
4434
  */
4128
4435
  'put'(
4129
- parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
4436
+ parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.QueryParameters & Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
4130
4437
  data?: Paths.PublicProxyPut.RequestBody,
4131
4438
  config?: AxiosRequestConfig
4132
4439
  ): OperationResponse<Paths.PublicProxyPut.Responses.$200>
@@ -4136,7 +4443,7 @@ export interface PathsDictionary {
4136
4443
  * Forward a PATCH request to a registered proxy target from a public-facing component
4137
4444
  */
4138
4445
  'patch'(
4139
- parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
4446
+ parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.QueryParameters & Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
4140
4447
  data?: Paths.PublicProxyPatch.RequestBody,
4141
4448
  config?: AxiosRequestConfig
4142
4449
  ): OperationResponse<Paths.PublicProxyPatch.Responses.$200>
@@ -4146,7 +4453,7 @@ export interface PathsDictionary {
4146
4453
  * Forward a DELETE request to a registered proxy target from a public-facing component
4147
4454
  */
4148
4455
  'delete'(
4149
- parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
4456
+ parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.QueryParameters & Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
4150
4457
  data?: any,
4151
4458
  config?: AxiosRequestConfig
4152
4459
  ): OperationResponse<Paths.PublicProxyDelete.Responses.$200>
@@ -4192,8 +4499,11 @@ export type ExternalProductCatalogComponent = Components.Schemas.ExternalProduct
4192
4499
  export type ExternalProductCatalogConfig = Components.Schemas.ExternalProductCatalogConfig;
4193
4500
  export type ExternalProductCatalogHookProductRecommendations = Components.Schemas.ExternalProductCatalogHookProductRecommendations;
4194
4501
  export type ExternalProductCatalogHookProducts = Components.Schemas.ExternalProductCatalogHookProducts;
4502
+ export type FunctionDefinition = Components.Schemas.FunctionDefinition;
4503
+ export type FunctionRefCustomActionConfig = Components.Schemas.FunctionRefCustomActionConfig;
4195
4504
  export type Grants = Components.Schemas.Grants;
4196
4505
  export type Installation = Components.Schemas.Installation;
4506
+ export type InternalReview = Components.Schemas.InternalReview;
4197
4507
  export type JourneyBlockComponent = Components.Schemas.JourneyBlockComponent;
4198
4508
  export type JourneyBlockComponentArgs = Components.Schemas.JourneyBlockComponentArgs;
4199
4509
  export type JourneyBlockConfig = Components.Schemas.JourneyBlockConfig;
@@ -4229,6 +4539,5 @@ export type RawEvents = Components.Schemas.RawEvents;
4229
4539
  export type Review = Components.Schemas.Review;
4230
4540
  export type Role = Components.Schemas.Role;
4231
4541
  export type S3Reference = Components.Schemas.S3Reference;
4232
- export type SandboxCustomActionConfig = Components.Schemas.SandboxCustomActionConfig;
4233
4542
  export type TextArg = Components.Schemas.TextArg;
4234
4543
  export type TranslatedString = Components.Schemas.TranslatedString;
package/dist/openapi.json CHANGED
@@ -1438,6 +1438,70 @@
1438
1438
  }
1439
1439
  }
1440
1440
  },
1441
+ "/v1/app/{appId}/options/resolve": {
1442
+ "post": {
1443
+ "summary": "resolveOptions",
1444
+ "description": "Resolve the effective app-level options of an installation, including decrypted sensitive values (secrets). This endpoint accepts epilot internal-auth tokens exclusively (internal service calls, e.g. automation-workers or the customer portal API) — no user token, API key, or app token can call it, regardless of roles. Every call is audit-logged with the caller identity.",
1445
+ "operationId": "resolveOptions",
1446
+ "tags": [
1447
+ "App Installation"
1448
+ ],
1449
+ "parameters": [
1450
+ {
1451
+ "name": "appId",
1452
+ "in": "path",
1453
+ "required": true,
1454
+ "schema": {
1455
+ "type": "string"
1456
+ }
1457
+ }
1458
+ ],
1459
+ "requestBody": {
1460
+ "content": {
1461
+ "application/json": {
1462
+ "schema": {
1463
+ "type": "object",
1464
+ "properties": {
1465
+ "keys": {
1466
+ "type": "array",
1467
+ "items": {
1468
+ "type": "string"
1469
+ },
1470
+ "description": "Narrow the response to these option keys"
1471
+ }
1472
+ }
1473
+ }
1474
+ }
1475
+ }
1476
+ },
1477
+ "responses": {
1478
+ "200": {
1479
+ "description": "Effective options with resolved values",
1480
+ "content": {
1481
+ "application/json": {
1482
+ "schema": {
1483
+ "type": "object",
1484
+ "properties": {
1485
+ "options": {
1486
+ "type": "array",
1487
+ "items": {
1488
+ "$ref": "#/components/schemas/Options"
1489
+ }
1490
+ }
1491
+ }
1492
+ }
1493
+ }
1494
+ }
1495
+ },
1496
+ "403": {
1497
+ "description": "Caller is not authenticated with an internal-auth token"
1498
+ },
1499
+ "404": {
1500
+ "description": "App installation not found"
1501
+ }
1502
+ }
1503
+ }
1504
+ },
1441
1505
  "/v1/app-events": {
1442
1506
  "post": {
1443
1507
  "summary": "ingestEvent",
@@ -1501,6 +1565,18 @@
1501
1565
  "type": "string"
1502
1566
  },
1503
1567
  "description": "Path to forward to the proxy target"
1568
+ },
1569
+ {
1570
+ "name": "query",
1571
+ "in": "query",
1572
+ "required": false,
1573
+ "style": "form",
1574
+ "explode": true,
1575
+ "schema": {
1576
+ "type": "object",
1577
+ "additionalProperties": true
1578
+ },
1579
+ "description": "Free-form query parameters, forwarded unchanged to the proxy target"
1504
1580
  }
1505
1581
  ],
1506
1582
  "get": {
@@ -1812,6 +1888,20 @@
1812
1888
  },
1813
1889
  "grants": {
1814
1890
  "$ref": "#/components/schemas/Grants"
1891
+ },
1892
+ "functions": {
1893
+ "type": "array",
1894
+ "items": {
1895
+ "$ref": "#/components/schemas/FunctionDefinition"
1896
+ },
1897
+ "description": "Replaces the full set of server-side functions for this version"
1898
+ },
1899
+ "options": {
1900
+ "type": "array",
1901
+ "items": {
1902
+ "$ref": "#/components/schemas/Options"
1903
+ },
1904
+ "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"
1815
1905
  }
1816
1906
  }
1817
1907
  }
@@ -1965,6 +2055,25 @@
1965
2055
  "object"
1966
2056
  ],
1967
2057
  "description": "The type of this option. `object` declares a structured value whose fields are listed\nunder `fields`. Combine with `repeatable: true` to express a list of these objects.\n"
2058
+ },
2059
+ "sensitive": {
2060
+ "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"
2062
+ },
2063
+ "configured": {
2064
+ "type": "boolean",
2065
+ "readOnly": true,
2066
+ "description": "Serialized instead of `value` for sensitive options (secrets): true when a\nvalue is stored.\n"
2067
+ },
2068
+ "lifted": {
2069
+ "type": "boolean",
2070
+ "readOnly": true,
2071
+ "description": "Compatibility marker: this option is declared at app level and folded back\ninto the component's options so existing consumers (journey runtime, portal\nblocks, older services) keep working unchanged. New consumers should read\napp-level options from the installation's `options` array instead.\n"
2072
+ },
2073
+ "value_updated_at": {
2074
+ "type": "string",
2075
+ "readOnly": true,
2076
+ "description": "Timestamp of the last value change. Only returned for sensitive options\n(alongside `configured`) so installers can see when a secret was last rotated.\n"
1968
2077
  }
1969
2078
  }
1970
2079
  },
@@ -2029,7 +2138,7 @@
2029
2138
  "properties": {
2030
2139
  "component_id": {
2031
2140
  "type": "string",
2032
- "description": "ID of the component these values are for"
2141
+ "description": "ID of the component these values are for. Use the sentinel `$app` for\napp-level option values (options declared at the manifest top level).\n"
2033
2142
  },
2034
2143
  "options": {
2035
2144
  "type": "array",
@@ -2069,10 +2178,87 @@
2069
2178
  "CUSTOM_CAPABILITY",
2070
2179
  "EXTERNAL_PRODUCT_CATALOG",
2071
2180
  "CUSTOM_PAGE",
2072
- "API_PROXY"
2181
+ "API_PROXY",
2182
+ "APP_FUNCTION"
2073
2183
  ],
2074
2184
  "description": "Type of app component"
2075
2185
  },
2186
+ "FunctionDefinition": {
2187
+ "type": "object",
2188
+ "description": "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.\n",
2189
+ "required": [
2190
+ "name",
2191
+ "type",
2192
+ "code"
2193
+ ],
2194
+ "properties": {
2195
+ "name": {
2196
+ "type": "string",
2197
+ "description": "Unique function name within the app",
2198
+ "pattern": "^[a-z0-9][a-z0-9-]{0,63}$"
2199
+ },
2200
+ "type": {
2201
+ "type": "string",
2202
+ "enum": [
2203
+ "workflow",
2204
+ "scheduled"
2205
+ ],
2206
+ "description": "Where the function can be used. `workflow` functions are referenced by CUSTOM_FLOW_ACTION components (type `function`) and run with entity context. `scheduled` functions run automatically per installation on their cron schedule.\n"
2207
+ },
2208
+ "label": {
2209
+ "allOf": [
2210
+ {
2211
+ "description": "Human-readable display name of the function, shown to installing organizations (e.g. in the scheduled-functions summary)\n"
2212
+ },
2213
+ {
2214
+ "$ref": "#/components/schemas/TranslatedString"
2215
+ }
2216
+ ]
2217
+ },
2218
+ "description": {
2219
+ "allOf": [
2220
+ {
2221
+ "description": "Description of the function"
2222
+ },
2223
+ {
2224
+ "$ref": "#/components/schemas/TranslatedString"
2225
+ }
2226
+ ]
2227
+ },
2228
+ "code": {
2229
+ "type": "string",
2230
+ "maxLength": 307200,
2231
+ "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"
2232
+ },
2233
+ "schedule": {
2234
+ "type": "string",
2235
+ "maxLength": 100,
2236
+ "description": "Cron trigger for the function, executed once per installation. Standard 5-field cron expression (e.g. \"0 3 * * *\") or rate expression (e.g. \"rate(30 minutes)\"). Minimum interval: 15 minutes. Scheduled runs are limited to 60 seconds.\n",
2237
+ "example": "rate(30 minutes)"
2238
+ },
2239
+ "schedule_timezone": {
2240
+ "type": "string",
2241
+ "description": "IANA timezone the cron expression is evaluated in",
2242
+ "default": "Europe/Berlin"
2243
+ },
2244
+ "schedule_overlap": {
2245
+ "type": "string",
2246
+ "enum": [
2247
+ "skip"
2248
+ ],
2249
+ "default": "skip",
2250
+ "description": "Behavior when the previous scheduled run is still active"
2251
+ },
2252
+ "secrets": {
2253
+ "type": "array",
2254
+ "items": {
2255
+ "type": "string"
2256
+ },
2257
+ "deprecated": true,
2258
+ "description": "DEPRECATED and ignored — functions receive the app's full effective option keyspace (sensitive values included) via input.app_options. Kept for manifest compatibility.\n"
2259
+ }
2260
+ }
2261
+ },
2076
2262
  "Author": {
2077
2263
  "type": "object",
2078
2264
  "required": [
@@ -2159,6 +2345,13 @@
2159
2345
  },
2160
2346
  "description": "List of options for the app component"
2161
2347
  },
2348
+ "uses_options": {
2349
+ "type": "array",
2350
+ "items": {
2351
+ "type": "string"
2352
+ },
2353
+ "description": "Keys of app-level options this component uses. Narrows which options are\nfolded back into `options` for legacy consumers (e.g. which values a journey\nblock receives in its public args) — a scoping hint, never a security\nboundary. Stamped automatically by the component-options migration; may also\nbe declared by the app developer.\n"
2354
+ },
2162
2355
  "surfaces": {
2163
2356
  "type": "object"
2164
2357
  }
@@ -2486,7 +2679,7 @@
2486
2679
  }
2487
2680
  ]
2488
2681
  },
2489
- "SandboxCustomActionConfig": {
2682
+ "FunctionRefCustomActionConfig": {
2490
2683
  "allOf": [
2491
2684
  {
2492
2685
  "$ref": "#/components/schemas/BaseCustomActionConfig"
@@ -2497,41 +2690,37 @@
2497
2690
  "type": {
2498
2691
  "type": "string",
2499
2692
  "enum": [
2500
- "sandbox"
2693
+ "function"
2501
2694
  ]
2502
2695
  },
2503
- "sandbox_settings": {
2504
- "type": "object",
2505
- "properties": {
2506
- "code": {
2507
- "type": "string",
2508
- "description": "JavaScript code to execute for the sandbox action. Maximum size: 300KB (hard limit). Code is stored as raw JavaScript and will be syntax-validated on save. Security restrictions: eval() and Function() constructor are not allowed.\n",
2509
- "maxLength": 307200
2510
- }
2511
- }
2696
+ "function_name": {
2697
+ "type": "string",
2698
+ "description": "Name of a `workflow`-type function of the same app version. The component provides the org-facing contract (name, options, config surface); the referenced function provides the code.\n"
2512
2699
  }
2513
2700
  },
2514
2701
  "required": [
2515
- "type"
2702
+ "type",
2703
+ "function_name"
2516
2704
  ]
2517
2705
  }
2518
2706
  ]
2519
2707
  },
2520
2708
  "CustomFlowConfig": {
2521
2709
  "type": "object",
2710
+ "description": "Configuration of a flow action component. `external_integration` calls an external HTTP endpoint; `function` runs a workflow-type app function in the epilot sandbox.\n",
2522
2711
  "oneOf": [
2523
2712
  {
2524
2713
  "$ref": "#/components/schemas/ExternalIntegrationCustomActionConfig"
2525
2714
  },
2526
2715
  {
2527
- "$ref": "#/components/schemas/SandboxCustomActionConfig"
2716
+ "$ref": "#/components/schemas/FunctionRefCustomActionConfig"
2528
2717
  }
2529
2718
  ],
2530
2719
  "discriminator": {
2531
2720
  "propertyName": "type",
2532
2721
  "mapping": {
2533
2722
  "external_integration": "#/components/schemas/ExternalIntegrationCustomActionConfig",
2534
- "sandbox": "#/components/schemas/SandboxCustomActionConfig"
2723
+ "function": "#/components/schemas/FunctionRefCustomActionConfig"
2535
2724
  }
2536
2725
  }
2537
2726
  },
@@ -4563,6 +4752,39 @@
4563
4752
  }
4564
4753
  }
4565
4754
  },
4755
+ "InternalReview": {
4756
+ "description": "Review entry including app ownership info, used by internal admin endpoints",
4757
+ "allOf": [
4758
+ {
4759
+ "$ref": "#/components/schemas/Review"
4760
+ },
4761
+ {
4762
+ "type": "object",
4763
+ "properties": {
4764
+ "app_id": {
4765
+ "type": "string",
4766
+ "description": "ID of the app configuration",
4767
+ "readOnly": true
4768
+ },
4769
+ "org_id": {
4770
+ "type": "string",
4771
+ "description": "Organization ID of the app owner",
4772
+ "readOnly": true
4773
+ },
4774
+ "reviewed_by": {
4775
+ "type": "string",
4776
+ "description": "Identity of the internal reviewer who approved the review",
4777
+ "readOnly": true
4778
+ },
4779
+ "reviewed_at": {
4780
+ "type": "string",
4781
+ "description": "Timestamp of the approval",
4782
+ "readOnly": true
4783
+ }
4784
+ }
4785
+ }
4786
+ ]
4787
+ },
4566
4788
  "ConfigurationMetadata": {
4567
4789
  "description": "Basic metadata about your app configuration which does not get versioned",
4568
4790
  "type": "object",
@@ -4708,6 +4930,22 @@
4708
4930
  },
4709
4931
  "minItems": 0
4710
4932
  },
4933
+ "functions": {
4934
+ "type": "array",
4935
+ "items": {
4936
+ "$ref": "#/components/schemas/FunctionDefinition"
4937
+ },
4938
+ "minItems": 0,
4939
+ "description": "Server-side functions of the app, including scheduled functions"
4940
+ },
4941
+ "options": {
4942
+ "type": "array",
4943
+ "items": {
4944
+ "$ref": "#/components/schemas/Options"
4945
+ },
4946
+ "minItems": 0,
4947
+ "description": "App-level option declarations (with sensitivity) of this version"
4948
+ },
4711
4949
  "visibility": {
4712
4950
  "type": "string",
4713
4951
  "enum": [
@@ -4816,10 +5054,11 @@
4816
5054
  "enum": [
4817
5055
  "header",
4818
5056
  "bearer",
5057
+ "basic",
4819
5058
  "oauth2",
4820
5059
  "none"
4821
5060
  ],
4822
- "description": "Authentication strategy"
5061
+ "description": "Authentication strategy. 'basic' sends an HTTP Basic Authorization header built server-side from the 'username' and 'password' component options."
4823
5062
  },
4824
5063
  "auth_header": {
4825
5064
  "type": "string",
@@ -4915,6 +5154,11 @@
4915
5154
  "description": "Name of the app",
4916
5155
  "readOnly": true
4917
5156
  },
5157
+ "icon_url": {
5158
+ "type": "string",
5159
+ "description": "Public URL of the app logo, if one has been uploaded",
5160
+ "readOnly": true
5161
+ },
4918
5162
  "option_values": {
4919
5163
  "type": "array",
4920
5164
  "items": {
@@ -4931,6 +5175,22 @@
4931
5175
  "minLength": 0,
4932
5176
  "readOnly": true
4933
5177
  },
5178
+ "functions": {
5179
+ "description": "Server-side functions of the installed version, including scheduled functions",
5180
+ "type": "array",
5181
+ "items": {
5182
+ "$ref": "#/components/schemas/FunctionDefinition"
5183
+ },
5184
+ "readOnly": true
5185
+ },
5186
+ "options": {
5187
+ "description": "Effective app-level options of the installation: declared top-level options plus\ncomponent-level options lifted to the app keyspace, each with its configured\n`value`. Values of sensitive options (secrets) are never included — they carry\n`configured` and `value_updated_at` instead.\n",
5188
+ "type": "array",
5189
+ "items": {
5190
+ "$ref": "#/components/schemas/Options"
5191
+ },
5192
+ "readOnly": true
5193
+ },
4934
5194
  "installed_version": {
4935
5195
  "type": "string",
4936
5196
  "description": "Version of the app that is installed",
@@ -5038,6 +5298,22 @@
5038
5298
  },
5039
5299
  "minItems": 0
5040
5300
  },
5301
+ "functions": {
5302
+ "type": "array",
5303
+ "items": {
5304
+ "$ref": "#/components/schemas/FunctionDefinition"
5305
+ },
5306
+ "minItems": 0,
5307
+ "description": "Server-side functions of the app, including scheduled functions"
5308
+ },
5309
+ "options": {
5310
+ "type": "array",
5311
+ "items": {
5312
+ "$ref": "#/components/schemas/Options"
5313
+ },
5314
+ "minItems": 0,
5315
+ "description": "App-level option declarations (with sensitivity) of this version"
5316
+ },
5041
5317
  "is_beta": {
5042
5318
  "type": "boolean",
5043
5319
  "description": "Flag to indicate if the app is in beta.",
@@ -5288,6 +5564,11 @@
5288
5564
  "correlation_id": {
5289
5565
  "type": "string",
5290
5566
  "description": "Filter by correlation ID for tracing"
5567
+ },
5568
+ "search": {
5569
+ "type": "string",
5570
+ "maxLength": 200,
5571
+ "description": "Case-insensitive substring match over event details and component id"
5291
5572
  }
5292
5573
  }
5293
5574
  },
@@ -5338,6 +5619,11 @@
5338
5619
  "minimum": 1,
5339
5620
  "maximum": 1000,
5340
5621
  "default": 100
5622
+ },
5623
+ "before": {
5624
+ "type": "string",
5625
+ "format": "date-time",
5626
+ "description": "Cursor: only return events strictly older than this timestamp. Use the timestamp of the last received event to fetch the next page; more efficient than increasing page/page_size.\n"
5341
5627
  }
5342
5628
  }
5343
5629
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.13.7",
3
+ "version": "0.14.1",
4
4
  "description": "JavaScript client library for the epilot App API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",