@epilot/app-client 0.12.1 → 0.12.3

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":{}}}},"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 p=n(t(466));r.default=p.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":{}}}},"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 p=r[n];if(void 0!==p)return p.exports;var o=r[n]={exports:{}};return e[n].call(o.exports,o,o.exports,t),o.exports}(330),n=exports;for(var p in t)n[p]=t[p];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
@@ -501,6 +501,41 @@
501
501
  },
502
502
  "responses": {}
503
503
  }
504
+ },
505
+ "/v1/public/app/{appId}/proxy/{proxyName}/{path}": {
506
+ "parameters": [
507
+ {
508
+ "name": "appId",
509
+ "in": "path",
510
+ "required": true,
511
+ "description": "ID of the installed app"
512
+ },
513
+ {
514
+ "name": "proxyName",
515
+ "in": "path",
516
+ "required": true,
517
+ "description": "Name of the proxy target as defined in the app manifest"
518
+ },
519
+ {
520
+ "name": "path",
521
+ "in": "path",
522
+ "required": true,
523
+ "description": "Path to forward to the proxy target"
524
+ }
525
+ ],
526
+ "get": {
527
+ "operationId": "publicProxyGet",
528
+ "responses": {}
529
+ },
530
+ "post": {
531
+ "operationId": "publicProxyPost",
532
+ "requestBody": {
533
+ "content": {
534
+ "application/json": {}
535
+ }
536
+ },
537
+ "responses": {}
538
+ }
504
539
  }
505
540
  },
506
541
  "components": {
package/dist/openapi.d.ts CHANGED
@@ -138,6 +138,35 @@ declare namespace Components {
138
138
  };
139
139
  }[];
140
140
  }
141
+ export interface ApiProxyComponent {
142
+ component_type: "API_PROXY";
143
+ configuration: /* Configuration for an API proxy component */ ApiProxyConfig;
144
+ }
145
+ /**
146
+ * Configuration for an API proxy component
147
+ */
148
+ export interface ApiProxyConfig {
149
+ /**
150
+ * Human-friendly proxy name used in SDK calls
151
+ */
152
+ name: string; // ^[a-zA-Z0-9_-]+$
153
+ /**
154
+ * Base URL of the target API. Must be HTTPS.
155
+ */
156
+ target: string; // uri ^https://
157
+ /**
158
+ * Authentication strategy
159
+ */
160
+ auth_type: "header" | "bearer" | "oauth2" | "none";
161
+ /**
162
+ * Header name for 'header' auth type
163
+ */
164
+ auth_header?: string;
165
+ /**
166
+ * OAuth2 token endpoint URL
167
+ */
168
+ token_url?: string; // uri ^https://
169
+ }
141
170
  export interface AppBridgeSurfaceConfig {
142
171
  /**
143
172
  * URL of the uploaded App Bridge App. This is the entrypoint for the app
@@ -245,7 +274,7 @@ declare namespace Components {
245
274
  surfaces?: {
246
275
  [key: string]: any;
247
276
  };
248
- } & (JourneyBlockComponent | PortalBlockComponent | PortalExtensionComponent | CustomFlowActionComponent | ErpInformToolkitComponent | CustomCapabilityComponent | ExternalProductCatalogComponent | CustomPageComponent);
277
+ } & (JourneyBlockComponent | PortalBlockComponent | PortalExtensionComponent | CustomFlowActionComponent | ErpInformToolkitComponent | CustomCapabilityComponent | ExternalProductCatalogComponent | CustomPageComponent | ApiProxyComponent);
249
278
  export interface BaseComponentCommon {
250
279
  /**
251
280
  * Unique identifier for the component
@@ -407,6 +436,22 @@ declare namespace Components {
407
436
  * How often the subscription is billed
408
437
  */
409
438
  export type BillingFrequency = "MONTHLY" | "QUARTERLY" | "YEARLY" | "CUSTOM";
439
+ /**
440
+ * References another journey block by its ID. The configuring user picks
441
+ * a block from the journey via a dropdown in the journey-builder; the
442
+ * chosen block's ID is stored as the arg value (a string). The bundle can
443
+ * then call `subscribe(blockId, cb)` / `getValue(blockId)` against that ID.
444
+ *
445
+ */
446
+ export interface BlockReferenceArg {
447
+ type?: "block_reference";
448
+ /**
449
+ * Restrict the picker to blocks of these journey block types
450
+ * (e.g. ["availability-check", "address"]). Omit to allow any type.
451
+ *
452
+ */
453
+ allowed_types?: string[];
454
+ }
410
455
  export interface BlueprintRef {
411
456
  /**
412
457
  * ID of the blueprint
@@ -416,6 +461,10 @@ declare namespace Components {
416
461
  * ID of the job that created the blueprint
417
462
  */
418
463
  job_id?: string;
464
+ /**
465
+ * S3 key of a pre-exported blueprint zip used for cross-org installs
466
+ */
467
+ source_blueprint_file?: string;
419
468
  }
420
469
  export interface BooleanArg {
421
470
  type?: "boolean";
@@ -449,7 +498,7 @@ declare namespace Components {
449
498
  /**
450
499
  * Type of app component
451
500
  */
452
- export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "CUSTOM_PORTAL_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION" | "ERP_INFORM_TOOLKIT" | "CUSTOM_CAPABILITY" | "EXTERNAL_PRODUCT_CATALOG" | "CUSTOM_PAGE";
501
+ 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";
453
502
  /**
454
503
  * Configuration of the published app
455
504
  */
@@ -1210,7 +1259,7 @@ declare namespace Components {
1210
1259
  * Unique identifier for this component arg
1211
1260
  */
1212
1261
  key: string;
1213
- type: "text" | "boolean" | "enum";
1262
+ type: "text" | "boolean" | "enum" | "block_reference";
1214
1263
  /**
1215
1264
  * Flag to indicate if this option is required
1216
1265
  */
@@ -1241,7 +1290,14 @@ declare namespace Components {
1241
1290
  */
1242
1291
  de: string;
1243
1292
  };
1244
- } & (TextArg | BooleanArg | EnumArg);
1293
+ } & (TextArg | BooleanArg | EnumArg | /**
1294
+ * References another journey block by its ID. The configuring user picks
1295
+ * a block from the journey via a dropdown in the journey-builder; the
1296
+ * chosen block's ID is stored as the arg value (a string). The bundle can
1297
+ * then call `subscribe(blockId, cb)` / `getValue(blockId)` against that ID.
1298
+ *
1299
+ */
1300
+ BlockReferenceArg);
1245
1301
  export interface JourneyBlockConfig {
1246
1302
  override_dev_mode?: /* Override URL when app is in dev mode */ OverrideDevMode;
1247
1303
  /**
@@ -1359,9 +1415,9 @@ declare namespace Components {
1359
1415
  */
1360
1416
  override_url?: string;
1361
1417
  /**
1362
- * Define which section of the portal this block can be placed in
1418
+ * Define which surfaces of the portal this block can be placed in
1363
1419
  */
1364
- section?: "main" | "footer";
1420
+ supported_surfaces?: ("main" | "footer_inline" | "footer_left_absolute" | "footer_right_absolute")[];
1365
1421
  }
1366
1422
  export interface PortalExtensionAuthBlock {
1367
1423
  /**
@@ -2603,6 +2659,32 @@ declare namespace Paths {
2603
2659
  }
2604
2660
  }
2605
2661
  }
2662
+ namespace PublicProxyGet {
2663
+ namespace Responses {
2664
+ export interface $200 {
2665
+ }
2666
+ export interface $403 {
2667
+ }
2668
+ export interface $404 {
2669
+ }
2670
+ export interface $502 {
2671
+ }
2672
+ }
2673
+ }
2674
+ namespace PublicProxyPost {
2675
+ export interface RequestBody {
2676
+ }
2677
+ namespace Responses {
2678
+ export interface $200 {
2679
+ }
2680
+ export interface $403 {
2681
+ }
2682
+ export interface $404 {
2683
+ }
2684
+ export interface $502 {
2685
+ }
2686
+ }
2687
+ }
2606
2688
  namespace QueryEvents {
2607
2689
  namespace Parameters {
2608
2690
  export type AppId = string;
@@ -2667,6 +2749,18 @@ declare namespace Paths {
2667
2749
  componentId: Parameters.ComponentId;
2668
2750
  }
2669
2751
  }
2752
+ namespace V1PublicApp$AppIdProxy$ProxyName$Path {
2753
+ namespace Parameters {
2754
+ export type AppId = string;
2755
+ export type Path = string;
2756
+ export type ProxyName = string;
2757
+ }
2758
+ export interface PathParameters {
2759
+ appId: Parameters.AppId;
2760
+ proxyName: Parameters.ProxyName;
2761
+ path: Parameters.Path;
2762
+ }
2763
+ }
2670
2764
  }
2671
2765
 
2672
2766
 
@@ -2972,6 +3066,26 @@ export interface OperationMethods {
2972
3066
  data?: Paths.IngestEvent.RequestBody,
2973
3067
  config?: AxiosRequestConfig
2974
3068
  ): OperationResponse<Paths.IngestEvent.Responses.$202>
3069
+ /**
3070
+ * publicProxyGet - publicProxyGet
3071
+ *
3072
+ * Forward a GET request to a registered proxy target from a public-facing component (e.g. journey blocks)
3073
+ */
3074
+ 'publicProxyGet'(
3075
+ parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
3076
+ data?: any,
3077
+ config?: AxiosRequestConfig
3078
+ ): OperationResponse<Paths.PublicProxyGet.Responses.$200>
3079
+ /**
3080
+ * publicProxyPost - publicProxyPost
3081
+ *
3082
+ * Forward a POST request to a registered proxy target from a public-facing component (e.g. journey blocks)
3083
+ */
3084
+ 'publicProxyPost'(
3085
+ parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
3086
+ data?: Paths.PublicProxyPost.RequestBody,
3087
+ config?: AxiosRequestConfig
3088
+ ): OperationResponse<Paths.PublicProxyPost.Responses.$200>
2975
3089
  }
2976
3090
 
2977
3091
  export interface PathsDictionary {
@@ -3314,6 +3428,28 @@ export interface PathsDictionary {
3314
3428
  config?: AxiosRequestConfig
3315
3429
  ): OperationResponse<Paths.IngestEvent.Responses.$202>
3316
3430
  }
3431
+ ['/v1/public/app/{appId}/proxy/{proxyName}/{path}']: {
3432
+ /**
3433
+ * publicProxyGet - publicProxyGet
3434
+ *
3435
+ * Forward a GET request to a registered proxy target from a public-facing component (e.g. journey blocks)
3436
+ */
3437
+ 'get'(
3438
+ parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
3439
+ data?: any,
3440
+ config?: AxiosRequestConfig
3441
+ ): OperationResponse<Paths.PublicProxyGet.Responses.$200>
3442
+ /**
3443
+ * publicProxyPost - publicProxyPost
3444
+ *
3445
+ * Forward a POST request to a registered proxy target from a public-facing component (e.g. journey blocks)
3446
+ */
3447
+ 'post'(
3448
+ parameters?: Parameters<Paths.V1PublicApp$AppIdProxy$ProxyName$Path.PathParameters> | null,
3449
+ data?: Paths.PublicProxyPost.RequestBody,
3450
+ config?: AxiosRequestConfig
3451
+ ): OperationResponse<Paths.PublicProxyPost.Responses.$200>
3452
+ }
3317
3453
  }
3318
3454
 
3319
3455
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
@@ -3321,6 +3457,8 @@ export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
3321
3457
 
3322
3458
  export type Actor = Components.Schemas.Actor;
3323
3459
  export type AggregatedEvents = Components.Schemas.AggregatedEvents;
3460
+ export type ApiProxyComponent = Components.Schemas.ApiProxyComponent;
3461
+ export type ApiProxyConfig = Components.Schemas.ApiProxyConfig;
3324
3462
  export type AppBridgeSurfaceConfig = Components.Schemas.AppBridgeSurfaceConfig;
3325
3463
  export type AppEventData = Components.Schemas.AppEventData;
3326
3464
  export type Audit = Components.Schemas.Audit;
@@ -3330,6 +3468,7 @@ export type BaseComponentCommon = Components.Schemas.BaseComponentCommon;
3330
3468
  export type BaseCustomActionConfig = Components.Schemas.BaseCustomActionConfig;
3331
3469
  export type BatchEventRequest = Components.Schemas.BatchEventRequest;
3332
3470
  export type BillingFrequency = Components.Schemas.BillingFrequency;
3471
+ export type BlockReferenceArg = Components.Schemas.BlockReferenceArg;
3333
3472
  export type BlueprintRef = Components.Schemas.BlueprintRef;
3334
3473
  export type BooleanArg = Components.Schemas.BooleanArg;
3335
3474
  export type CallerIdentity = Components.Schemas.CallerIdentity;
package/dist/openapi.json CHANGED
@@ -17,6 +17,10 @@
17
17
  {
18
18
  "name": "App Analytics",
19
19
  "description": "Analytics for installed apps"
20
+ },
21
+ {
22
+ "name": "App Proxy",
23
+ "description": "Forward requests to external APIs via registered proxy targets"
20
24
  }
21
25
  ],
22
26
  "servers": [
@@ -1468,6 +1472,100 @@
1468
1472
  }
1469
1473
  }
1470
1474
  }
1475
+ },
1476
+ "/v1/public/app/{appId}/proxy/{proxyName}/{path}": {
1477
+ "parameters": [
1478
+ {
1479
+ "name": "appId",
1480
+ "in": "path",
1481
+ "required": true,
1482
+ "schema": {
1483
+ "type": "string"
1484
+ },
1485
+ "description": "ID of the installed app"
1486
+ },
1487
+ {
1488
+ "name": "proxyName",
1489
+ "in": "path",
1490
+ "required": true,
1491
+ "schema": {
1492
+ "type": "string"
1493
+ },
1494
+ "description": "Name of the proxy target as defined in the app manifest"
1495
+ },
1496
+ {
1497
+ "name": "path",
1498
+ "in": "path",
1499
+ "required": true,
1500
+ "schema": {
1501
+ "type": "string"
1502
+ },
1503
+ "description": "Path to forward to the proxy target"
1504
+ }
1505
+ ],
1506
+ "get": {
1507
+ "summary": "publicProxyGet",
1508
+ "operationId": "publicProxyGet",
1509
+ "description": "Forward a GET request to a registered proxy target from a public-facing component (e.g. journey blocks)",
1510
+ "tags": [
1511
+ "App Proxy"
1512
+ ],
1513
+ "security": [
1514
+ {
1515
+ "EpilotAuth": []
1516
+ }
1517
+ ],
1518
+ "responses": {
1519
+ "200": {
1520
+ "description": "Proxied response from the target API"
1521
+ },
1522
+ "403": {
1523
+ "description": "Forbidden - app not installed or no public component uses this proxy"
1524
+ },
1525
+ "404": {
1526
+ "description": "Proxy target not found"
1527
+ },
1528
+ "502": {
1529
+ "description": "Bad gateway - proxy target unreachable or error"
1530
+ }
1531
+ }
1532
+ },
1533
+ "post": {
1534
+ "summary": "publicProxyPost",
1535
+ "operationId": "publicProxyPost",
1536
+ "description": "Forward a POST request to a registered proxy target from a public-facing component (e.g. journey blocks)",
1537
+ "tags": [
1538
+ "App Proxy"
1539
+ ],
1540
+ "security": [
1541
+ {
1542
+ "EpilotAuth": []
1543
+ }
1544
+ ],
1545
+ "requestBody": {
1546
+ "content": {
1547
+ "application/json": {
1548
+ "schema": {
1549
+ "type": "object"
1550
+ }
1551
+ }
1552
+ }
1553
+ },
1554
+ "responses": {
1555
+ "200": {
1556
+ "description": "Proxied response from the target API"
1557
+ },
1558
+ "403": {
1559
+ "description": "Forbidden - app not installed or no public component uses this proxy"
1560
+ },
1561
+ "404": {
1562
+ "description": "Proxy target not found"
1563
+ },
1564
+ "502": {
1565
+ "description": "Bad gateway - proxy target unreachable or error"
1566
+ }
1567
+ }
1568
+ }
1471
1569
  }
1472
1570
  },
1473
1571
  "components": {
@@ -1832,7 +1930,8 @@
1832
1930
  "ERP_INFORM_TOOLKIT",
1833
1931
  "CUSTOM_CAPABILITY",
1834
1932
  "EXTERNAL_PRODUCT_CATALOG",
1835
- "CUSTOM_PAGE"
1933
+ "CUSTOM_PAGE",
1934
+ "API_PROXY"
1836
1935
  ],
1837
1936
  "description": "Type of app component"
1838
1937
  },
@@ -1944,7 +2043,8 @@
1944
2043
  "ERP_INFORM_TOOLKIT": "#/components/schemas/ErpInformToolkitComponent",
1945
2044
  "CUSTOM_CAPABILITY": "#/components/schemas/CustomCapabilityComponent",
1946
2045
  "EXTERNAL_PRODUCT_CATALOG": "#/components/schemas/ExternalProductCatalogComponent",
1947
- "CUSTOM_PAGE": "#/components/schemas/CustomPageComponent"
2046
+ "CUSTOM_PAGE": "#/components/schemas/CustomPageComponent",
2047
+ "API_PROXY": "#/components/schemas/ApiProxyComponent"
1948
2048
  }
1949
2049
  },
1950
2050
  "oneOf": [
@@ -1971,11 +2071,32 @@
1971
2071
  },
1972
2072
  {
1973
2073
  "$ref": "#/components/schemas/CustomPageComponent"
2074
+ },
2075
+ {
2076
+ "$ref": "#/components/schemas/ApiProxyComponent"
1974
2077
  }
1975
2078
  ]
1976
2079
  }
1977
2080
  ]
1978
2081
  },
2082
+ "ApiProxyComponent": {
2083
+ "type": "object",
2084
+ "required": [
2085
+ "component_type",
2086
+ "configuration"
2087
+ ],
2088
+ "properties": {
2089
+ "component_type": {
2090
+ "type": "string",
2091
+ "enum": [
2092
+ "API_PROXY"
2093
+ ]
2094
+ },
2095
+ "configuration": {
2096
+ "$ref": "#/components/schemas/ApiProxyConfig"
2097
+ }
2098
+ }
2099
+ },
1979
2100
  "CustomCapabilityComponent": {
1980
2101
  "type": "object",
1981
2102
  "required": [
@@ -3391,12 +3512,20 @@
3391
3512
  {
3392
3513
  "type": "object",
3393
3514
  "properties": {
3394
- "section": {
3395
- "description": "Define which section of the portal this block can be placed in",
3396
- "type": "string",
3397
- "enum": [
3398
- "main",
3399
- "footer"
3515
+ "supported_surfaces": {
3516
+ "description": "Define which surfaces of the portal this block can be placed in",
3517
+ "type": "array",
3518
+ "items": {
3519
+ "type": "string",
3520
+ "enum": [
3521
+ "main",
3522
+ "footer_inline",
3523
+ "footer_left_absolute",
3524
+ "footer_right_absolute"
3525
+ ]
3526
+ },
3527
+ "default": [
3528
+ "main"
3400
3529
  ]
3401
3530
  }
3402
3531
  }
@@ -3422,7 +3551,8 @@
3422
3551
  "enum": [
3423
3552
  "text",
3424
3553
  "boolean",
3425
- "enum"
3554
+ "enum",
3555
+ "block_reference"
3426
3556
  ]
3427
3557
  },
3428
3558
  "required": {
@@ -3459,7 +3589,8 @@
3459
3589
  "mapping": {
3460
3590
  "text": "#/components/schemas/TextArg",
3461
3591
  "boolean": "#/components/schemas/BooleanArg",
3462
- "enum": "#/components/schemas/EnumArg"
3592
+ "enum": "#/components/schemas/EnumArg",
3593
+ "block_reference": "#/components/schemas/BlockReferenceArg"
3463
3594
  }
3464
3595
  },
3465
3596
  "oneOf": [
@@ -3471,6 +3602,9 @@
3471
3602
  },
3472
3603
  {
3473
3604
  "$ref": "#/components/schemas/EnumArg"
3605
+ },
3606
+ {
3607
+ "$ref": "#/components/schemas/BlockReferenceArg"
3474
3608
  }
3475
3609
  ]
3476
3610
  }
@@ -3498,6 +3632,25 @@
3498
3632
  }
3499
3633
  }
3500
3634
  },
3635
+ "BlockReferenceArg": {
3636
+ "type": "object",
3637
+ "description": "References another journey block by its ID. The configuring user picks\na block from the journey via a dropdown in the journey-builder; the\nchosen block's ID is stored as the arg value (a string). The bundle can\nthen call `subscribe(blockId, cb)` / `getValue(blockId)` against that ID.\n",
3638
+ "properties": {
3639
+ "type": {
3640
+ "type": "string",
3641
+ "enum": [
3642
+ "block_reference"
3643
+ ]
3644
+ },
3645
+ "allowed_types": {
3646
+ "type": "array",
3647
+ "description": "Restrict the picker to blocks of these journey block types\n(e.g. [\"availability-check\", \"address\"]). Omit to allow any type.\n",
3648
+ "items": {
3649
+ "type": "string"
3650
+ }
3651
+ }
3652
+ }
3653
+ },
3501
3654
  "EnumArg": {
3502
3655
  "type": "object",
3503
3656
  "required": [
@@ -3868,6 +4021,49 @@
3868
4021
  }
3869
4022
  }
3870
4023
  },
4024
+ "ApiProxyConfig": {
4025
+ "type": "object",
4026
+ "description": "Configuration for an API proxy component",
4027
+ "required": [
4028
+ "name",
4029
+ "target",
4030
+ "auth_type"
4031
+ ],
4032
+ "properties": {
4033
+ "name": {
4034
+ "type": "string",
4035
+ "description": "Human-friendly proxy name used in SDK calls",
4036
+ "pattern": "^[a-zA-Z0-9_-]+$",
4037
+ "maxLength": 64
4038
+ },
4039
+ "target": {
4040
+ "type": "string",
4041
+ "format": "uri",
4042
+ "description": "Base URL of the target API. Must be HTTPS.",
4043
+ "pattern": "^https://"
4044
+ },
4045
+ "auth_type": {
4046
+ "type": "string",
4047
+ "enum": [
4048
+ "header",
4049
+ "bearer",
4050
+ "oauth2",
4051
+ "none"
4052
+ ],
4053
+ "description": "Authentication strategy"
4054
+ },
4055
+ "auth_header": {
4056
+ "type": "string",
4057
+ "description": "Header name for 'header' auth type"
4058
+ },
4059
+ "token_url": {
4060
+ "type": "string",
4061
+ "format": "uri",
4062
+ "description": "OAuth2 token endpoint URL",
4063
+ "pattern": "^https://"
4064
+ }
4065
+ }
4066
+ },
3871
4067
  "Grants": {
3872
4068
  "type": "array",
3873
4069
  "description": "Required grants for the app in order to call APIs for the installing tenant",
@@ -3898,6 +4094,10 @@
3898
4094
  "job_id": {
3899
4095
  "type": "string",
3900
4096
  "description": "ID of the job that created the blueprint"
4097
+ },
4098
+ "source_blueprint_file": {
4099
+ "type": "string",
4100
+ "description": "S3 key of a pre-exported blueprint zip used for cross-org installs"
3901
4101
  }
3902
4102
  }
3903
4103
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.12.1",
3
+ "version": "0.12.3",
4
4
  "description": "JavaScript client library for the epilot App API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "test": "vitest",
26
26
  "typescript": "tsc",
27
27
  "bundle-definition": "webpack",
28
- "openapi:local": "node ../../scripts/update-openapi.js ../../../app-api/openapi.yml",
28
+ "openapi:local": "node ../../scripts/update-openapi.js /Users/sauerer/epilot/app-api/openapi.yml",
29
29
  "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/app.yaml",
30
30
  "typegen": "openapi typegen src/openapi.json --client > src/openapi.d.ts",
31
31
  "build": "tsc && npm run build:patch && npm run bundle-definition",
@@ -64,7 +64,7 @@
64
64
  "axios": "^1.11.0",
65
65
  "copy-webpack-plugin": "^7.0.0",
66
66
  "json-loader": "^0.5.7",
67
- "openapicmd": "^2.7.0",
67
+ "openapicmd": "^2.9.2",
68
68
  "ts-loader": "^8.0.14",
69
69
  "ts-node": "^10.9.1",
70
70
  "typescript": "^4.1.3",