@epilot/app-client 0.3.6 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/openapi.d.ts CHANGED
@@ -141,7 +141,7 @@ declare namespace Components {
141
141
  * List of options for the app component
142
142
  */
143
143
  options?: /* Options for the component configuration */ Options[];
144
- } & (JourneyBlockComponent | PortalExtensionComponent);
144
+ } & (JourneyBlockComponent | PortalExtensionComponent | CustomFlowActionComponent);
145
145
  export interface BaseComponentCommon {
146
146
  /**
147
147
  * Unique identifier for the component
@@ -178,6 +178,52 @@ declare namespace Components {
178
178
  */
179
179
  options?: /* Options for the component configuration */ Options[];
180
180
  }
181
+ export interface BaseCustomActionConfig {
182
+ /**
183
+ * Name of the custom action
184
+ */
185
+ name?: string;
186
+ /**
187
+ * Description of the custom action
188
+ */
189
+ description?: string;
190
+ /**
191
+ * The ID of the app to fetch configuration from the app API
192
+ * example:
193
+ * c451c26a-cc7a-4c1c-92bf-1c6246cbfe88
194
+ */
195
+ app_id: string;
196
+ }
197
+ export interface BasicCustomActionConfig {
198
+ /**
199
+ * Name of the custom action
200
+ */
201
+ name?: string;
202
+ /**
203
+ * Description of the custom action
204
+ */
205
+ description?: string;
206
+ /**
207
+ * The ID of the app to fetch configuration from the app API
208
+ * example:
209
+ * c451c26a-cc7a-4c1c-92bf-1c6246cbfe88
210
+ */
211
+ app_id: string;
212
+ type: "basic";
213
+ basic_settings?: {
214
+ /**
215
+ * URL to call
216
+ */
217
+ url?: string;
218
+ headers?: {
219
+ [name: string]: any;
220
+ };
221
+ /**
222
+ * SSM Reference to the auth token to use for the request
223
+ */
224
+ auth_token_ref?: string;
225
+ };
226
+ }
181
227
  /**
182
228
  * How often the subscription is billed
183
229
  */
@@ -214,7 +260,7 @@ declare namespace Components {
214
260
  /**
215
261
  * Type of app component
216
262
  */
217
- export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "PORTAL_EXTENSION";
263
+ export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION";
218
264
  /**
219
265
  * Configuration of the published app
220
266
  */
@@ -541,6 +587,11 @@ declare namespace Components {
541
587
  versioned_by?: string;
542
588
  };
543
589
  }
590
+ export interface CustomFlowActionComponent {
591
+ component_type: "CUSTOM_FLOW_ACTION";
592
+ configuration: CustomFlowConfig;
593
+ }
594
+ export type CustomFlowConfig = BasicCustomActionConfig;
544
595
  export interface EnumArg {
545
596
  type?: "enum";
546
597
  /**
@@ -1762,6 +1813,8 @@ export type Audit = Components.Schemas.Audit;
1762
1813
  export type Author = Components.Schemas.Author;
1763
1814
  export type BaseComponent = Components.Schemas.BaseComponent;
1764
1815
  export type BaseComponentCommon = Components.Schemas.BaseComponentCommon;
1816
+ export type BaseCustomActionConfig = Components.Schemas.BaseCustomActionConfig;
1817
+ export type BasicCustomActionConfig = Components.Schemas.BasicCustomActionConfig;
1765
1818
  export type BillingFrequency = Components.Schemas.BillingFrequency;
1766
1819
  export type BooleanArg = Components.Schemas.BooleanArg;
1767
1820
  export type CallerIdentity = Components.Schemas.CallerIdentity;
@@ -1769,6 +1822,8 @@ export type ComponentType = Components.Schemas.ComponentType;
1769
1822
  export type Configuration = Components.Schemas.Configuration;
1770
1823
  export type ConfigurationMetadata = Components.Schemas.ConfigurationMetadata;
1771
1824
  export type ConfigurationVersion = Components.Schemas.ConfigurationVersion;
1825
+ export type CustomFlowActionComponent = Components.Schemas.CustomFlowActionComponent;
1826
+ export type CustomFlowConfig = Components.Schemas.CustomFlowConfig;
1772
1827
  export type EnumArg = Components.Schemas.EnumArg;
1773
1828
  export type Installation = Components.Schemas.Installation;
1774
1829
  export type JourneyBlockComponent = Components.Schemas.JourneyBlockComponent;
package/dist/openapi.json CHANGED
@@ -1262,7 +1262,8 @@
1262
1262
  "type": "string",
1263
1263
  "enum": [
1264
1264
  "CUSTOM_JOURNEY_BLOCK",
1265
- "PORTAL_EXTENSION"
1265
+ "PORTAL_EXTENSION",
1266
+ "CUSTOM_FLOW_ACTION"
1266
1267
  ],
1267
1268
  "description": "Type of app component"
1268
1269
  },
@@ -1365,7 +1366,8 @@
1365
1366
  "propertyName": "component_type",
1366
1367
  "mapping": {
1367
1368
  "CUSTOM_JOURNEY_BLOCK": "#/components/schemas/JourneyBlockComponent",
1368
- "PORTAL_EXTENSION": "#/components/schemas/PortalExtensionComponent"
1369
+ "PORTAL_EXTENSION": "#/components/schemas/PortalExtensionComponent",
1370
+ "CUSTOM_FLOW_ACTION": "#/components/schemas/CustomFlowActionComponent"
1369
1371
  }
1370
1372
  },
1371
1373
  "oneOf": [
@@ -1374,6 +1376,9 @@
1374
1376
  },
1375
1377
  {
1376
1378
  "$ref": "#/components/schemas/PortalExtensionComponent"
1379
+ },
1380
+ {
1381
+ "$ref": "#/components/schemas/CustomFlowActionComponent"
1377
1382
  }
1378
1383
  ]
1379
1384
  }
@@ -1397,6 +1402,97 @@
1397
1402
  }
1398
1403
  }
1399
1404
  },
1405
+ "CustomFlowActionComponent": {
1406
+ "type": "object",
1407
+ "required": [
1408
+ "component_type",
1409
+ "configuration"
1410
+ ],
1411
+ "properties": {
1412
+ "component_type": {
1413
+ "type": "string",
1414
+ "enum": [
1415
+ "CUSTOM_FLOW_ACTION"
1416
+ ]
1417
+ },
1418
+ "configuration": {
1419
+ "$ref": "#/components/schemas/CustomFlowConfig"
1420
+ }
1421
+ }
1422
+ },
1423
+ "BaseCustomActionConfig": {
1424
+ "type": "object",
1425
+ "properties": {
1426
+ "name": {
1427
+ "type": "string",
1428
+ "description": "Name of the custom action"
1429
+ },
1430
+ "description": {
1431
+ "type": "string",
1432
+ "description": "Description of the custom action"
1433
+ },
1434
+ "app_id": {
1435
+ "type": "string",
1436
+ "description": "The ID of the app to fetch configuration from the app API",
1437
+ "example": "c451c26a-cc7a-4c1c-92bf-1c6246cbfe88"
1438
+ }
1439
+ },
1440
+ "required": [
1441
+ "app_id"
1442
+ ]
1443
+ },
1444
+ "BasicCustomActionConfig": {
1445
+ "allOf": [
1446
+ {
1447
+ "$ref": "#/components/schemas/BaseCustomActionConfig"
1448
+ },
1449
+ {
1450
+ "type": "object",
1451
+ "properties": {
1452
+ "type": {
1453
+ "type": "string",
1454
+ "enum": [
1455
+ "basic"
1456
+ ]
1457
+ },
1458
+ "basic_settings": {
1459
+ "type": "object",
1460
+ "properties": {
1461
+ "url": {
1462
+ "type": "string",
1463
+ "description": "URL to call"
1464
+ },
1465
+ "headers": {
1466
+ "type": "object",
1467
+ "additionalProperties": true
1468
+ },
1469
+ "auth_token_ref": {
1470
+ "type": "string",
1471
+ "description": "SSM Reference to the auth token to use for the request"
1472
+ }
1473
+ }
1474
+ }
1475
+ },
1476
+ "required": [
1477
+ "type"
1478
+ ]
1479
+ }
1480
+ ]
1481
+ },
1482
+ "CustomFlowConfig": {
1483
+ "type": "object",
1484
+ "oneOf": [
1485
+ {
1486
+ "$ref": "#/components/schemas/BasicCustomActionConfig"
1487
+ }
1488
+ ],
1489
+ "discriminator": {
1490
+ "propertyName": "type",
1491
+ "mapping": {
1492
+ "basic": "#/components/schemas/BasicCustomActionConfig"
1493
+ }
1494
+ }
1495
+ },
1400
1496
  "PortalExtensionComponent": {
1401
1497
  "type": "object",
1402
1498
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.3.6",
3
+ "version": "0.5.0",
4
4
  "description": "JavaScript client library for the epilot App API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -73,4 +73,4 @@
73
73
  "webpack-cli": "^4.4.0"
74
74
  },
75
75
  "gitHead": "39426e86cfb320fa3227dc03f60ee6a10848e7c7"
76
- }
76
+ }