@epilot/app-client 0.5.6 → 0.6.0-rc.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={187:function(e,r,t){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(t(466));r.default=o.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.1.0","info":{"title":"","version":""},"servers":[{"url":"https://app.sls.epilot.io"}],"paths":{"/v1/app-configurations":{"get":{"operationId":"listConfigurations","parameters":[{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}},"post":{"operationId":"createConfiguration","requestBody":{"$ref":"#/components/requestBodies/CreateConfigRequest"},"responses":{}}},"/v1/app-configurations/public/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration to install"}],"get":{"operationId":"getPublicConfiguration","parameters":[{"name":"version","in":"query"}],"responses":{}}},"/v1/app-configurations/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"get":{"operationId":"getConfiguration","parameters":[{"name":"version","in":"query"}],"responses":{}},"patch":{"operationId":"patchMetadata","requestBody":{"$ref":"#/components/requestBodies/PatchConfigMetadataRequest"},"responses":{}},"delete":{"operationId":"deleteConfiguration","responses":{}}},"/v1/app-configurations/{appId}/bundle":{"post":{"operationId":"createBundleUploadUrl","parameters":[{"name":"appId","in":"path","required":true}],"requestBody":{"$ref":"#/components/requestBodies/CreateBundlePresignedRequest"},"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}/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":{}}}},"components":{"requestBodies":{"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 a=r[n]={exports:{}};return e[n].call(a.exports,a,a.exports,t),a.exports}(187),n=exports;for(var o in t)n[o]=t[o];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
1
+ (()=>{"use strict";var e={187:function(e,r,t){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var o=n(t(466));r.default=o.default},466:e=>{e.exports=JSON.parse('{"openapi":"3.1.0","info":{"title":"","version":""},"servers":[{"url":"https://app.sls.epilot.io"}],"paths":{"/v1/app-configurations":{"get":{"operationId":"listConfigurations","parameters":[{"name":"page","in":"query"},{"name":"pageSize","in":"query"}],"responses":{}},"post":{"operationId":"createConfiguration","requestBody":{"$ref":"#/components/requestBodies/CreateConfigRequest"},"responses":{}}},"/v1/app-configurations/public/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration to install"}],"get":{"operationId":"getPublicConfiguration","parameters":[{"name":"version","in":"query"}],"responses":{}}},"/v1/app-configurations/{appId}":{"parameters":[{"name":"appId","in":"path","required":true,"description":"ID of the app configuration"}],"get":{"operationId":"getConfiguration","parameters":[{"name":"version","in":"query"}],"responses":{}},"patch":{"operationId":"patchMetadata","requestBody":{"$ref":"#/components/requestBodies/PatchConfigMetadataRequest"},"responses":{}},"delete":{"operationId":"deleteConfiguration","responses":{}}},"/v1/app-configurations/{appId}/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}/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":{}}}},"components":{"requestBodies":{"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 a=r[n]={exports:{}};return e[n].call(a.exports,a,a.exports,t),a.exports}(187),n=exports;for(var o in t)n[o]=t[o];t.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
@@ -100,6 +100,24 @@
100
100
  "responses": {}
101
101
  }
102
102
  },
103
+ "/v1/app-configurations/{appId}/zip": {
104
+ "post": {
105
+ "operationId": "createZipUploadUrl",
106
+ "parameters": [
107
+ {
108
+ "name": "appId",
109
+ "in": "path",
110
+ "required": true
111
+ }
112
+ ],
113
+ "requestBody": {
114
+ "content": {
115
+ "application/json": {}
116
+ }
117
+ },
118
+ "responses": {}
119
+ }
120
+ },
103
121
  "/v1/app-configurations/{appId}/logo": {
104
122
  "parameters": [
105
123
  {
package/dist/openapi.d.ts CHANGED
@@ -16,7 +16,7 @@ declare namespace Components {
16
16
  */
17
17
  version: string;
18
18
  /**
19
- * ID of the journye block component
19
+ * ID of the journey block component
20
20
  */
21
21
  component_id?: string;
22
22
  }
@@ -89,6 +89,12 @@ declare namespace Components {
89
89
  export type UpsertComponentRequest = Schemas.BaseComponent;
90
90
  }
91
91
  namespace Schemas {
92
+ export interface AppBridgeSurfaceConfig {
93
+ /**
94
+ * URL of the uploaded App Bridge App
95
+ */
96
+ app_url: string;
97
+ }
92
98
  export interface Audit {
93
99
  /**
94
100
  * Timestamp of the creation
@@ -579,6 +585,9 @@ declare namespace Components {
579
585
  export interface CustomFlowActionComponent {
580
586
  component_type: "CUSTOM_FLOW_ACTION";
581
587
  configuration: CustomFlowConfig;
588
+ surfaces?: {
589
+ flow_action_config?: AppBridgeSurfaceConfig;
590
+ };
582
591
  }
583
592
  export type CustomFlowConfig = ExternalIntegrationCustomActionConfig;
584
593
  export interface EnumArg {
@@ -1140,6 +1149,35 @@ declare namespace Paths {
1140
1149
  }
1141
1150
  }
1142
1151
  }
1152
+ namespace CreateZipUploadUrl {
1153
+ namespace Parameters {
1154
+ export type AppId = string;
1155
+ }
1156
+ export interface PathParameters {
1157
+ appId: Parameters.AppId;
1158
+ }
1159
+ export interface RequestBody {
1160
+ }
1161
+ namespace Responses {
1162
+ export interface $200 {
1163
+ /**
1164
+ * Presigned S3 URL for uploading the bundle
1165
+ */
1166
+ upload_url: string;
1167
+ /**
1168
+ * Public CDN URL for the unpacked artifacts
1169
+ */
1170
+ artifact_url: string;
1171
+ s3ref?: Components.Schemas.S3Reference;
1172
+ /**
1173
+ * Timestamp when the upload URL expires
1174
+ */
1175
+ expires_at?: string; // date-time
1176
+ }
1177
+ export interface $404 {
1178
+ }
1179
+ }
1180
+ }
1143
1181
  namespace DeleteComponent {
1144
1182
  namespace Parameters {
1145
1183
  export type AppId = string;
@@ -1517,13 +1555,24 @@ export interface OperationMethods {
1517
1555
  /**
1518
1556
  * createBundleUploadUrl - createBundleUploadUrl
1519
1557
  *
1520
- * Generate a presigned URL for uploading app bundle to /<app-id>/bundle.zip path
1558
+ * Generate a presigned URL for uploading app bundle to /<app-id>/bundle.js path
1521
1559
  */
1522
1560
  'createBundleUploadUrl'(
1523
1561
  parameters?: Parameters<Paths.CreateBundleUploadUrl.PathParameters> | null,
1524
1562
  data?: Paths.CreateBundleUploadUrl.RequestBody,
1525
1563
  config?: AxiosRequestConfig
1526
1564
  ): OperationResponse<Paths.CreateBundleUploadUrl.Responses.$200>
1565
+ /**
1566
+ * createZipUploadUrl - createZipUploadUrl
1567
+ *
1568
+ * Generate a presigned URL to upload a zip file with artifacts that will be unpacked in a new directory under the /<app-id>/ path
1569
+ *
1570
+ */
1571
+ 'createZipUploadUrl'(
1572
+ parameters?: Parameters<Paths.CreateZipUploadUrl.PathParameters> | null,
1573
+ data?: Paths.CreateZipUploadUrl.RequestBody,
1574
+ config?: AxiosRequestConfig
1575
+ ): OperationResponse<Paths.CreateZipUploadUrl.Responses.$200>
1527
1576
  /**
1528
1577
  * createLogoUploadUrl - createLogoUploadUrl
1529
1578
  *
@@ -1757,7 +1806,7 @@ export interface PathsDictionary {
1757
1806
  /**
1758
1807
  * createBundleUploadUrl - createBundleUploadUrl
1759
1808
  *
1760
- * Generate a presigned URL for uploading app bundle to /<app-id>/bundle.zip path
1809
+ * Generate a presigned URL for uploading app bundle to /<app-id>/bundle.js path
1761
1810
  */
1762
1811
  'post'(
1763
1812
  parameters?: Parameters<Paths.CreateBundleUploadUrl.PathParameters> | null,
@@ -1765,6 +1814,19 @@ export interface PathsDictionary {
1765
1814
  config?: AxiosRequestConfig
1766
1815
  ): OperationResponse<Paths.CreateBundleUploadUrl.Responses.$200>
1767
1816
  }
1817
+ ['/v1/app-configurations/{appId}/zip']: {
1818
+ /**
1819
+ * createZipUploadUrl - createZipUploadUrl
1820
+ *
1821
+ * Generate a presigned URL to upload a zip file with artifacts that will be unpacked in a new directory under the /<app-id>/ path
1822
+ *
1823
+ */
1824
+ 'post'(
1825
+ parameters?: Parameters<Paths.CreateZipUploadUrl.PathParameters> | null,
1826
+ data?: Paths.CreateZipUploadUrl.RequestBody,
1827
+ config?: AxiosRequestConfig
1828
+ ): OperationResponse<Paths.CreateZipUploadUrl.Responses.$200>
1829
+ }
1768
1830
  ['/v1/app-configurations/{appId}/logo']: {
1769
1831
  /**
1770
1832
  * createLogoUploadUrl - createLogoUploadUrl
@@ -1947,6 +2009,7 @@ export interface PathsDictionary {
1947
2009
 
1948
2010
  export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
1949
2011
 
2012
+ export type AppBridgeSurfaceConfig = Components.Schemas.AppBridgeSurfaceConfig;
1950
2013
  export type Audit = Components.Schemas.Audit;
1951
2014
  export type Author = Components.Schemas.Author;
1952
2015
  export type BaseComponent = Components.Schemas.BaseComponent;
package/dist/openapi.json CHANGED
@@ -257,7 +257,7 @@
257
257
  "/v1/app-configurations/{appId}/bundle": {
258
258
  "post": {
259
259
  "summary": "createBundleUploadUrl",
260
- "description": "Generate a presigned URL for uploading app bundle to /<app-id>/bundle.zip path",
260
+ "description": "Generate a presigned URL for uploading app bundle to /<app-id>/bundle.js path",
261
261
  "operationId": "createBundleUploadUrl",
262
262
  "tags": [
263
263
  "App Configuration"
@@ -318,6 +318,74 @@
318
318
  }
319
319
  }
320
320
  },
321
+ "/v1/app-configurations/{appId}/zip": {
322
+ "post": {
323
+ "summary": "createZipUploadUrl",
324
+ "operationId": "createZipUploadUrl",
325
+ "description": "Generate a presigned URL to upload a zip file with artifacts that will be unpacked in a new directory under the /<app-id>/ path\n",
326
+ "tags": [
327
+ "App Configuration"
328
+ ],
329
+ "parameters": [
330
+ {
331
+ "name": "appId",
332
+ "in": "path",
333
+ "required": true,
334
+ "schema": {
335
+ "type": "string"
336
+ },
337
+ "description": "ID of the app configuration"
338
+ }
339
+ ],
340
+ "requestBody": {
341
+ "content": {
342
+ "application/json": {
343
+ "schema": {
344
+ "type": "object",
345
+ "additionalProperties": false
346
+ }
347
+ }
348
+ }
349
+ },
350
+ "responses": {
351
+ "200": {
352
+ "description": "Upload URL generated successfully",
353
+ "content": {
354
+ "application/json": {
355
+ "schema": {
356
+ "type": "object",
357
+ "required": [
358
+ "upload_url",
359
+ "artifact_url"
360
+ ],
361
+ "properties": {
362
+ "upload_url": {
363
+ "type": "string",
364
+ "description": "Presigned S3 URL for uploading the bundle"
365
+ },
366
+ "artifact_url": {
367
+ "type": "string",
368
+ "description": "Public CDN URL for the unpacked artifacts"
369
+ },
370
+ "s3ref": {
371
+ "$ref": "#/components/schemas/S3Reference"
372
+ },
373
+ "expires_at": {
374
+ "type": "string",
375
+ "format": "date-time",
376
+ "description": "Timestamp when the upload URL expires"
377
+ }
378
+ }
379
+ }
380
+ }
381
+ }
382
+ },
383
+ "404": {
384
+ "description": "App configuration not found"
385
+ }
386
+ }
387
+ }
388
+ },
321
389
  "/v1/app-configurations/{appId}/logo": {
322
390
  "parameters": [
323
391
  {
@@ -1112,7 +1180,7 @@
1112
1180
  },
1113
1181
  "component_id": {
1114
1182
  "type": "string",
1115
- "description": "ID of the journye block component"
1183
+ "description": "ID of the journey block component"
1116
1184
  }
1117
1185
  }
1118
1186
  }
@@ -1525,6 +1593,14 @@
1525
1593
  },
1526
1594
  "configuration": {
1527
1595
  "$ref": "#/components/schemas/CustomFlowConfig"
1596
+ },
1597
+ "surfaces": {
1598
+ "type": "object",
1599
+ "properties": {
1600
+ "flow_action_config": {
1601
+ "$ref": "#/components/schemas/AppBridgeSurfaceConfig"
1602
+ }
1603
+ }
1528
1604
  }
1529
1605
  }
1530
1606
  },
@@ -1792,6 +1868,18 @@
1792
1868
  }
1793
1869
  }
1794
1870
  },
1871
+ "AppBridgeSurfaceConfig": {
1872
+ "type": "object",
1873
+ "properties": {
1874
+ "app_url": {
1875
+ "type": "string",
1876
+ "description": "URL of the uploaded App Bridge App"
1877
+ }
1878
+ },
1879
+ "required": [
1880
+ "app_url"
1881
+ ]
1882
+ },
1795
1883
  "JourneyBlockComponentArgs": {
1796
1884
  "allOf": [
1797
1885
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.5.6",
3
+ "version": "0.6.0-rc.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",
@@ -25,7 +25,7 @@
25
25
  "test": "jest",
26
26
  "typescript": "tsc",
27
27
  "bundle-definition": "webpack",
28
- "openapi": "node ../../scripts/update-openapi.js ../../../backend/app-api/packages/functions/src/api/openapi.yml",
28
+ "openapi": "node ../../scripts/update-openapi.js https://docs.api.epilot.io/app.yaml",
29
29
  "typegen": "openapi typegen src/openapi.json --client -b '/* eslint-disable */' > src/openapi.d.ts",
30
30
  "build": "tsc && npm run build:patch && npm run bundle-definition",
31
31
  "build:patch": "sed -i'' -e '/^__exportStar.*openapi.*$/d' dist/index.js",