@epilot/app-client 0.3.6 → 0.4.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,64 @@ 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
+ * The ID of the component from the app. As the app can potentially have multiple custom actions, this ID is used to identify the component
198
+ * example:
199
+ * 2f1c26a-cc7a-4c1c-92bf-1c6246cbfe88
200
+ */
201
+ component_id: string;
202
+ }
203
+ export interface BasicCustomActionConfig {
204
+ /**
205
+ * Name of the custom action
206
+ */
207
+ name?: string;
208
+ /**
209
+ * Description of the custom action
210
+ */
211
+ description?: string;
212
+ /**
213
+ * The ID of the app to fetch configuration from the app API
214
+ * example:
215
+ * c451c26a-cc7a-4c1c-92bf-1c6246cbfe88
216
+ */
217
+ app_id: string;
218
+ /**
219
+ * The ID of the component from the app. As the app can potentially have multiple custom actions, this ID is used to identify the component
220
+ * example:
221
+ * 2f1c26a-cc7a-4c1c-92bf-1c6246cbfe88
222
+ */
223
+ component_id: string;
224
+ type: "basic";
225
+ basic_settings?: {
226
+ /**
227
+ * URL to call
228
+ */
229
+ url?: string;
230
+ headers?: {
231
+ [name: string]: any;
232
+ };
233
+ /**
234
+ * SSM Reference to the auth token to use for the request
235
+ */
236
+ auth_token_ref?: string;
237
+ };
238
+ }
181
239
  /**
182
240
  * How often the subscription is billed
183
241
  */
@@ -214,7 +272,7 @@ declare namespace Components {
214
272
  /**
215
273
  * Type of app component
216
274
  */
217
- export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "PORTAL_EXTENSION";
275
+ export type ComponentType = "CUSTOM_JOURNEY_BLOCK" | "PORTAL_EXTENSION" | "CUSTOM_FLOW_ACTION";
218
276
  /**
219
277
  * Configuration of the published app
220
278
  */
@@ -541,6 +599,11 @@ declare namespace Components {
541
599
  versioned_by?: string;
542
600
  };
543
601
  }
602
+ export interface CustomFlowActionComponent {
603
+ component_type: "CUSTOM_FLOW_ACTION";
604
+ configuration: CustomFlowConfig;
605
+ }
606
+ export type CustomFlowConfig = BasicCustomActionConfig;
544
607
  export interface EnumArg {
545
608
  type?: "enum";
546
609
  /**
@@ -709,7 +772,7 @@ declare namespace Components {
709
772
  * Define data which is mapped to entity mapping ui blocks
710
773
  */
711
774
  component_mapping?: {
712
- [name: string]: "string" | "boolean" | "date" | "datetime" | "link" | "number";
775
+ [name: string]: "string" | "boolean" | "date" | "datetime" | "link";
713
776
  };
714
777
  }
715
778
  export interface NotificationConfig {
@@ -1762,6 +1825,8 @@ export type Audit = Components.Schemas.Audit;
1762
1825
  export type Author = Components.Schemas.Author;
1763
1826
  export type BaseComponent = Components.Schemas.BaseComponent;
1764
1827
  export type BaseComponentCommon = Components.Schemas.BaseComponentCommon;
1828
+ export type BaseCustomActionConfig = Components.Schemas.BaseCustomActionConfig;
1829
+ export type BasicCustomActionConfig = Components.Schemas.BasicCustomActionConfig;
1765
1830
  export type BillingFrequency = Components.Schemas.BillingFrequency;
1766
1831
  export type BooleanArg = Components.Schemas.BooleanArg;
1767
1832
  export type CallerIdentity = Components.Schemas.CallerIdentity;
@@ -1769,6 +1834,8 @@ export type ComponentType = Components.Schemas.ComponentType;
1769
1834
  export type Configuration = Components.Schemas.Configuration;
1770
1835
  export type ConfigurationMetadata = Components.Schemas.ConfigurationMetadata;
1771
1836
  export type ConfigurationVersion = Components.Schemas.ConfigurationVersion;
1837
+ export type CustomFlowActionComponent = Components.Schemas.CustomFlowActionComponent;
1838
+ export type CustomFlowConfig = Components.Schemas.CustomFlowConfig;
1772
1839
  export type EnumArg = Components.Schemas.EnumArg;
1773
1840
  export type Installation = Components.Schemas.Installation;
1774
1841
  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,103 @@
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
+ "component_id": {
1440
+ "type": "string",
1441
+ "description": "The ID of the component from the app. As the app can potentially have multiple custom actions, this ID is used to identify the component",
1442
+ "example": "2f1c26a-cc7a-4c1c-92bf-1c6246cbfe88"
1443
+ }
1444
+ },
1445
+ "required": [
1446
+ "app_id",
1447
+ "component_id"
1448
+ ]
1449
+ },
1450
+ "BasicCustomActionConfig": {
1451
+ "allOf": [
1452
+ {
1453
+ "$ref": "#/components/schemas/BaseCustomActionConfig"
1454
+ },
1455
+ {
1456
+ "type": "object",
1457
+ "properties": {
1458
+ "type": {
1459
+ "type": "string",
1460
+ "enum": [
1461
+ "basic"
1462
+ ]
1463
+ },
1464
+ "basic_settings": {
1465
+ "type": "object",
1466
+ "properties": {
1467
+ "url": {
1468
+ "type": "string",
1469
+ "description": "URL to call"
1470
+ },
1471
+ "headers": {
1472
+ "type": "object",
1473
+ "additionalProperties": true
1474
+ },
1475
+ "auth_token_ref": {
1476
+ "type": "string",
1477
+ "description": "SSM Reference to the auth token to use for the request"
1478
+ }
1479
+ }
1480
+ }
1481
+ },
1482
+ "required": [
1483
+ "type"
1484
+ ]
1485
+ }
1486
+ ]
1487
+ },
1488
+ "CustomFlowConfig": {
1489
+ "type": "object",
1490
+ "oneOf": [
1491
+ {
1492
+ "$ref": "#/components/schemas/BasicCustomActionConfig"
1493
+ }
1494
+ ],
1495
+ "discriminator": {
1496
+ "propertyName": "type",
1497
+ "mapping": {
1498
+ "basic": "#/components/schemas/BasicCustomActionConfig"
1499
+ }
1500
+ }
1501
+ },
1400
1502
  "PortalExtensionComponent": {
1401
1503
  "type": "object",
1402
1504
  "required": [
@@ -1575,8 +1677,7 @@
1575
1677
  "boolean",
1576
1678
  "date",
1577
1679
  "datetime",
1578
- "link",
1579
- "number"
1680
+ "link"
1580
1681
  ]
1581
1682
  }
1582
1683
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/app-client",
3
- "version": "0.3.6",
3
+ "version": "0.4.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
+ }