@epilot/entity-mapping-client 0.8.5 → 0.8.6

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
@@ -144,6 +144,10 @@ declare namespace Components {
144
144
  export interface JourneyRef {
145
145
  journey_id?: string;
146
146
  }
147
+ /**
148
+ * This string value will be replaced with the value of the loop index, when mapping in loop mode
149
+ */
150
+ export type LoopIndexString = "##LOOP_INDEX##";
147
151
  export interface MapCondition {
148
152
  _exists?: ConditionNode;
149
153
  _equals?: ConditionNode;
@@ -266,6 +270,60 @@ declare namespace Components {
266
270
  export interface MappingHistoryResp {
267
271
  results: MappingHistoryEntry[];
268
272
  }
273
+ export interface MappingSource {
274
+ /**
275
+ * Key aiming to identify source
276
+ */
277
+ key: string;
278
+ /**
279
+ * Each item describes a property under the main source and a possibly, a default value for its target attribute
280
+ */
281
+ sub_properties?: MappingSourceProperty[];
282
+ /**
283
+ * Data Structure type of source
284
+ */
285
+ source_type: string;
286
+ /**
287
+ * Data Structure Type of the underlaying output value
288
+ */
289
+ possible_target_types?: MappingSourceTargetType[];
290
+ /**
291
+ * Initial value of a relation to be added
292
+ */
293
+ initial_relation?: RelationAttribute;
294
+ /**
295
+ * Human readable name of the Source
296
+ */
297
+ title: string;
298
+ /**
299
+ * Human readable type of the source
300
+ */
301
+ sub_title?: string;
302
+ target_settings?: {
303
+ /**
304
+ * Describes which actions the user can perform on each target, if specified. If not specified, all actions are allowed
305
+ */
306
+ allowed_ui_actions?: ("schema-select" | "attribute-select" | "target-delete" | "target-add" | "target")[];
307
+ /**
308
+ * Whether its a read-only ui or not. Can be each target, or only the first. Overwrites uiActions
309
+ */
310
+ locked?: "each" | "first" | "system_recommendation";
311
+ /**
312
+ * Whether all source mappings flow into a single attribute (e.g. address)
313
+ */
314
+ isSingleTarget?: boolean;
315
+ /**
316
+ * Determines whether a mapping target should be shown or not. Use if there are targets which cannot be manipulated by the UI. E.g journey_data
317
+ */
318
+ visibility?: {
319
+ mode: "hide" | "show" | "message";
320
+ if: {
321
+ [name: string]: string;
322
+ };
323
+ message?: string;
324
+ };
325
+ };
326
+ }
269
327
  export interface MappingSourceProperty {
270
328
  value: string;
271
329
  label: string;
package/dist/openapi.json CHANGED
@@ -927,6 +927,13 @@
927
927
  }
928
928
  }
929
929
  },
930
+ "Loop_Index_String": {
931
+ "type": "string",
932
+ "description": "This string value will be replaced with the value of the loop index, when mapping in loop mode",
933
+ "enum": [
934
+ "##LOOP_INDEX##"
935
+ ]
936
+ },
930
937
  "TargetConfig": {
931
938
  "type": "object",
932
939
  "properties": {
@@ -1445,6 +1452,109 @@
1445
1452
  "mapped_entities_snapshot"
1446
1453
  ]
1447
1454
  },
1455
+ "MappingSource": {
1456
+ "type": "object",
1457
+ "properties": {
1458
+ "key": {
1459
+ "type": "string",
1460
+ "description": "Key aiming to identify source"
1461
+ },
1462
+ "sub_properties": {
1463
+ "description": "Each item describes a property under the main source and a possibly, a default value for its target attribute",
1464
+ "type": "array",
1465
+ "items": {
1466
+ "$ref": "#/components/schemas/MappingSourceProperty"
1467
+ }
1468
+ },
1469
+ "source_type": {
1470
+ "type": "string",
1471
+ "description": "Data Structure type of source"
1472
+ },
1473
+ "possible_target_types": {
1474
+ "type": "array",
1475
+ "items": {
1476
+ "$ref": "#/components/schemas/MappingSourceTargetType"
1477
+ },
1478
+ "description": "Data Structure Type of the underlaying output value"
1479
+ },
1480
+ "initial_relation": {
1481
+ "description": "Initial value of a relation to be added",
1482
+ "$ref": "#/components/schemas/RelationAttribute"
1483
+ },
1484
+ "title": {
1485
+ "type": "string",
1486
+ "description": "Human readable name of the Source"
1487
+ },
1488
+ "sub_title": {
1489
+ "type": "string",
1490
+ "description": "Human readable type of the source"
1491
+ },
1492
+ "target_settings": {
1493
+ "type": "object",
1494
+ "properties": {
1495
+ "allowed_ui_actions": {
1496
+ "type": "array",
1497
+ "items": {
1498
+ "type": "string",
1499
+ "enum": [
1500
+ "schema-select",
1501
+ "attribute-select",
1502
+ "target-delete",
1503
+ "target-add",
1504
+ "target"
1505
+ ]
1506
+ },
1507
+ "description": "Describes which actions the user can perform on each target, if specified. If not specified, all actions are allowed"
1508
+ },
1509
+ "locked": {
1510
+ "type": "string",
1511
+ "enum": [
1512
+ "each",
1513
+ "first",
1514
+ "system_recommendation"
1515
+ ],
1516
+ "description": "Whether its a read-only ui or not. Can be each target, or only the first. Overwrites uiActions"
1517
+ },
1518
+ "isSingleTarget": {
1519
+ "type": "boolean",
1520
+ "description": "Whether all source mappings flow into a single attribute (e.g. address)"
1521
+ },
1522
+ "visibility": {
1523
+ "description": "Determines whether a mapping target should be shown or not. Use if there are targets which cannot be manipulated by the UI. E.g journey_data",
1524
+ "type": "object",
1525
+ "properties": {
1526
+ "mode": {
1527
+ "type": "string",
1528
+ "enum": [
1529
+ "hide",
1530
+ "show",
1531
+ "message"
1532
+ ]
1533
+ },
1534
+ "if": {
1535
+ "type": "object",
1536
+ "additionalProperties": {
1537
+ "type": "string"
1538
+ }
1539
+ },
1540
+ "message": {
1541
+ "type": "string"
1542
+ }
1543
+ },
1544
+ "required": [
1545
+ "mode",
1546
+ "if"
1547
+ ]
1548
+ }
1549
+ }
1550
+ }
1551
+ },
1552
+ "required": [
1553
+ "key",
1554
+ "title",
1555
+ "source_type"
1556
+ ]
1557
+ },
1448
1558
  "MappingSourceProperty": {
1449
1559
  "type": "object",
1450
1560
  "properties": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/entity-mapping-client",
3
- "version": "0.8.5",
3
+ "version": "0.8.6",
4
4
  "description": "JavaScript client library for the ePilot Entity Mapping 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 https://docs.api.epilot.io/entity-mapping-api.yaml",
28
+ "openapi": "node ../../scripts/update-openapi.js /Users/mohannad/epilot/entity-mapping-api/openapi.yml",
29
29
  "typegen": "echo '/* eslint-disable */' > src/openapi.d.ts && typegen ./src/openapi.json >> src/openapi.d.ts",
30
30
  "build": "tsc && npm run bundle-definition",
31
31
  "build:watch": "npm run build && tsc -w",