@eventcatalog/sdk 2.12.0 → 2.12.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.
@@ -38,7 +38,7 @@ function parseArguments(rawArgs) {
38
38
  }
39
39
 
40
40
  // src/index.ts
41
- import { join as join17 } from "node:path";
41
+ import { join as join18 } from "node:path";
42
42
 
43
43
  // src/events.ts
44
44
  import fs2 from "node:fs/promises";
@@ -1317,6 +1317,29 @@ var dataProductHasVersion = (directory) => async (id, version2) => {
1317
1317
  };
1318
1318
  var addFileToDataProduct = (directory) => async (id, file, version2) => addFileToResource(directory, id, file, version2);
1319
1319
 
1320
+ // src/diagrams.ts
1321
+ import fs14 from "node:fs/promises";
1322
+ import { join as join17 } from "node:path";
1323
+ var getDiagram = (directory) => async (id, version2) => getResource(directory, id, version2, { type: "diagram" });
1324
+ var getDiagrams = (directory) => async (options) => getResources(directory, { type: "diagrams", latestOnly: options?.latestOnly });
1325
+ var writeDiagram = (directory) => async (diagram, options = {
1326
+ path: "",
1327
+ override: false,
1328
+ format: "mdx"
1329
+ }) => writeResource(directory, { ...diagram }, { ...options, type: "diagram" });
1330
+ var rmDiagram = (directory) => async (path7) => {
1331
+ await fs14.rm(join17(directory, path7), { recursive: true });
1332
+ };
1333
+ var rmDiagramById = (directory) => async (id, version2, persistFiles) => {
1334
+ await rmResourceById(directory, id, version2, { type: "diagram", persistFiles });
1335
+ };
1336
+ var versionDiagram = (directory) => async (id) => versionResource(directory, id);
1337
+ var diagramHasVersion = (directory) => async (id, version2) => {
1338
+ const file = await findFileById(directory, id, version2);
1339
+ return !!file;
1340
+ };
1341
+ var addFileToDiagram = (directory) => async (id, file, version2) => addFileToResource(directory, id, file, version2, { type: "diagram" });
1342
+
1320
1343
  // src/index.ts
1321
1344
  var src_default = (path7) => {
1322
1345
  return {
@@ -1326,13 +1349,13 @@ var src_default = (path7) => {
1326
1349
  * @param version - Optional id of the version to get (supports semver)
1327
1350
  * @returns Event|Undefined
1328
1351
  */
1329
- getEvent: getEvent(join17(path7)),
1352
+ getEvent: getEvent(join18(path7)),
1330
1353
  /**
1331
1354
  * Returns all events from EventCatalog
1332
1355
  * @param latestOnly - optional boolean, set to true to get only latest versions
1333
1356
  * @returns Event[]|Undefined
1334
1357
  */
1335
- getEvents: getEvents(join17(path7)),
1358
+ getEvents: getEvents(join18(path7)),
1336
1359
  /**
1337
1360
  * Adds an event to EventCatalog
1338
1361
  *
@@ -1340,7 +1363,7 @@ var src_default = (path7) => {
1340
1363
  * @param options - Optional options to write the event
1341
1364
  *
1342
1365
  */
1343
- writeEvent: writeEvent(join17(path7, "events")),
1366
+ writeEvent: writeEvent(join18(path7, "events")),
1344
1367
  /**
1345
1368
  * Adds an event to a service in EventCatalog
1346
1369
  *
@@ -1349,26 +1372,26 @@ var src_default = (path7) => {
1349
1372
  * @param options - Optional options to write the event
1350
1373
  *
1351
1374
  */
1352
- writeEventToService: writeEventToService(join17(path7)),
1375
+ writeEventToService: writeEventToService(join18(path7)),
1353
1376
  /**
1354
1377
  * Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
1355
1378
  *
1356
1379
  * @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
1357
1380
  *
1358
1381
  */
1359
- rmEvent: rmEvent(join17(path7, "events")),
1382
+ rmEvent: rmEvent(join18(path7, "events")),
1360
1383
  /**
1361
1384
  * Remove an event by an Event id
1362
1385
  *
1363
1386
  * @param id - The id of the event you want to remove
1364
1387
  *
1365
1388
  */
1366
- rmEventById: rmEventById(join17(path7)),
1389
+ rmEventById: rmEventById(join18(path7)),
1367
1390
  /**
1368
1391
  * Moves a given event id to the version directory
1369
1392
  * @param directory
1370
1393
  */
1371
- versionEvent: versionEvent(join17(path7)),
1394
+ versionEvent: versionEvent(join18(path7)),
1372
1395
  /**
1373
1396
  * Adds a file to the given event
1374
1397
  * @param id - The id of the event to add the file to
@@ -1376,7 +1399,7 @@ var src_default = (path7) => {
1376
1399
  * @param version - Optional version of the event to add the file to
1377
1400
  * @returns
1378
1401
  */
1379
- addFileToEvent: addFileToEvent(join17(path7)),
1402
+ addFileToEvent: addFileToEvent(join18(path7)),
1380
1403
  /**
1381
1404
  * Adds a schema to the given event
1382
1405
  * @param id - The id of the event to add the schema to
@@ -1384,14 +1407,14 @@ var src_default = (path7) => {
1384
1407
  * @param version - Optional version of the event to add the schema to
1385
1408
  * @returns
1386
1409
  */
1387
- addSchemaToEvent: addSchemaToEvent(join17(path7)),
1410
+ addSchemaToEvent: addSchemaToEvent(join18(path7)),
1388
1411
  /**
1389
1412
  * Check to see if an event version exists
1390
1413
  * @param id - The id of the event
1391
1414
  * @param version - The version of the event (supports semver)
1392
1415
  * @returns
1393
1416
  */
1394
- eventHasVersion: eventHasVersion(join17(path7)),
1417
+ eventHasVersion: eventHasVersion(join18(path7)),
1395
1418
  /**
1396
1419
  * ================================
1397
1420
  * Commands
@@ -1403,13 +1426,13 @@ var src_default = (path7) => {
1403
1426
  * @param version - Optional id of the version to get (supports semver)
1404
1427
  * @returns Command|Undefined
1405
1428
  */
1406
- getCommand: getCommand(join17(path7)),
1429
+ getCommand: getCommand(join18(path7)),
1407
1430
  /**
1408
1431
  * Returns all commands from EventCatalog
1409
1432
  * @param latestOnly - optional boolean, set to true to get only latest versions
1410
1433
  * @returns Command[]|Undefined
1411
1434
  */
1412
- getCommands: getCommands(join17(path7)),
1435
+ getCommands: getCommands(join18(path7)),
1413
1436
  /**
1414
1437
  * Adds an command to EventCatalog
1415
1438
  *
@@ -1417,7 +1440,7 @@ var src_default = (path7) => {
1417
1440
  * @param options - Optional options to write the command
1418
1441
  *
1419
1442
  */
1420
- writeCommand: writeCommand(join17(path7, "commands")),
1443
+ writeCommand: writeCommand(join18(path7, "commands")),
1421
1444
  /**
1422
1445
  * Adds a command to a service in EventCatalog
1423
1446
  *
@@ -1426,26 +1449,26 @@ var src_default = (path7) => {
1426
1449
  * @param options - Optional options to write the command
1427
1450
  *
1428
1451
  */
1429
- writeCommandToService: writeCommandToService(join17(path7)),
1452
+ writeCommandToService: writeCommandToService(join18(path7)),
1430
1453
  /**
1431
1454
  * Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
1432
1455
  *
1433
1456
  * @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
1434
1457
  *
1435
1458
  */
1436
- rmCommand: rmCommand(join17(path7, "commands")),
1459
+ rmCommand: rmCommand(join18(path7, "commands")),
1437
1460
  /**
1438
1461
  * Remove an command by an Event id
1439
1462
  *
1440
1463
  * @param id - The id of the command you want to remove
1441
1464
  *
1442
1465
  */
1443
- rmCommandById: rmCommandById(join17(path7)),
1466
+ rmCommandById: rmCommandById(join18(path7)),
1444
1467
  /**
1445
1468
  * Moves a given command id to the version directory
1446
1469
  * @param directory
1447
1470
  */
1448
- versionCommand: versionCommand(join17(path7)),
1471
+ versionCommand: versionCommand(join18(path7)),
1449
1472
  /**
1450
1473
  * Adds a file to the given command
1451
1474
  * @param id - The id of the command to add the file to
@@ -1453,7 +1476,7 @@ var src_default = (path7) => {
1453
1476
  * @param version - Optional version of the command to add the file to
1454
1477
  * @returns
1455
1478
  */
1456
- addFileToCommand: addFileToCommand(join17(path7)),
1479
+ addFileToCommand: addFileToCommand(join18(path7)),
1457
1480
  /**
1458
1481
  * Adds a schema to the given command
1459
1482
  * @param id - The id of the command to add the schema to
@@ -1461,14 +1484,14 @@ var src_default = (path7) => {
1461
1484
  * @param version - Optional version of the command to add the schema to
1462
1485
  * @returns
1463
1486
  */
1464
- addSchemaToCommand: addSchemaToCommand(join17(path7)),
1487
+ addSchemaToCommand: addSchemaToCommand(join18(path7)),
1465
1488
  /**
1466
1489
  * Check to see if a command version exists
1467
1490
  * @param id - The id of the command
1468
1491
  * @param version - The version of the command (supports semver)
1469
1492
  * @returns
1470
1493
  */
1471
- commandHasVersion: commandHasVersion(join17(path7)),
1494
+ commandHasVersion: commandHasVersion(join18(path7)),
1472
1495
  /**
1473
1496
  * ================================
1474
1497
  * Queries
@@ -1480,13 +1503,13 @@ var src_default = (path7) => {
1480
1503
  * @param version - Optional id of the version to get (supports semver)
1481
1504
  * @returns Query|Undefined
1482
1505
  */
1483
- getQuery: getQuery(join17(path7)),
1506
+ getQuery: getQuery(join18(path7)),
1484
1507
  /**
1485
1508
  * Returns all queries from EventCatalog
1486
1509
  * @param latestOnly - optional boolean, set to true to get only latest versions
1487
1510
  * @returns Query[]|Undefined
1488
1511
  */
1489
- getQueries: getQueries(join17(path7)),
1512
+ getQueries: getQueries(join18(path7)),
1490
1513
  /**
1491
1514
  * Adds a query to EventCatalog
1492
1515
  *
@@ -1494,7 +1517,7 @@ var src_default = (path7) => {
1494
1517
  * @param options - Optional options to write the event
1495
1518
  *
1496
1519
  */
1497
- writeQuery: writeQuery(join17(path7, "queries")),
1520
+ writeQuery: writeQuery(join18(path7, "queries")),
1498
1521
  /**
1499
1522
  * Adds a query to a service in EventCatalog
1500
1523
  *
@@ -1503,26 +1526,26 @@ var src_default = (path7) => {
1503
1526
  * @param options - Optional options to write the query
1504
1527
  *
1505
1528
  */
1506
- writeQueryToService: writeQueryToService(join17(path7)),
1529
+ writeQueryToService: writeQueryToService(join18(path7)),
1507
1530
  /**
1508
1531
  * Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
1509
1532
  *
1510
1533
  * @param path - The path to your query, e.g. `/Orders/GetOrder`
1511
1534
  *
1512
1535
  */
1513
- rmQuery: rmQuery(join17(path7, "queries")),
1536
+ rmQuery: rmQuery(join18(path7, "queries")),
1514
1537
  /**
1515
1538
  * Remove a query by a Query id
1516
1539
  *
1517
1540
  * @param id - The id of the query you want to remove
1518
1541
  *
1519
1542
  */
1520
- rmQueryById: rmQueryById(join17(path7)),
1543
+ rmQueryById: rmQueryById(join18(path7)),
1521
1544
  /**
1522
1545
  * Moves a given query id to the version directory
1523
1546
  * @param directory
1524
1547
  */
1525
- versionQuery: versionQuery(join17(path7)),
1548
+ versionQuery: versionQuery(join18(path7)),
1526
1549
  /**
1527
1550
  * Adds a file to the given query
1528
1551
  * @param id - The id of the query to add the file to
@@ -1530,7 +1553,7 @@ var src_default = (path7) => {
1530
1553
  * @param version - Optional version of the query to add the file to
1531
1554
  * @returns
1532
1555
  */
1533
- addFileToQuery: addFileToQuery(join17(path7)),
1556
+ addFileToQuery: addFileToQuery(join18(path7)),
1534
1557
  /**
1535
1558
  * Adds a schema to the given query
1536
1559
  * @param id - The id of the query to add the schema to
@@ -1538,14 +1561,14 @@ var src_default = (path7) => {
1538
1561
  * @param version - Optional version of the query to add the schema to
1539
1562
  * @returns
1540
1563
  */
1541
- addSchemaToQuery: addSchemaToQuery(join17(path7)),
1564
+ addSchemaToQuery: addSchemaToQuery(join18(path7)),
1542
1565
  /**
1543
1566
  * Check to see if an query version exists
1544
1567
  * @param id - The id of the query
1545
1568
  * @param version - The version of the query (supports semver)
1546
1569
  * @returns
1547
1570
  */
1548
- queryHasVersion: queryHasVersion(join17(path7)),
1571
+ queryHasVersion: queryHasVersion(join18(path7)),
1549
1572
  /**
1550
1573
  * ================================
1551
1574
  * Channels
@@ -1557,13 +1580,13 @@ var src_default = (path7) => {
1557
1580
  * @param version - Optional id of the version to get (supports semver)
1558
1581
  * @returns Channel|Undefined
1559
1582
  */
1560
- getChannel: getChannel(join17(path7)),
1583
+ getChannel: getChannel(join18(path7)),
1561
1584
  /**
1562
1585
  * Returns all channels from EventCatalog
1563
1586
  * @param latestOnly - optional boolean, set to true to get only latest versions
1564
1587
  * @returns Channel[]|Undefined
1565
1588
  */
1566
- getChannels: getChannels(join17(path7)),
1589
+ getChannels: getChannels(join18(path7)),
1567
1590
  /**
1568
1591
  * Adds an channel to EventCatalog
1569
1592
  *
@@ -1571,33 +1594,33 @@ var src_default = (path7) => {
1571
1594
  * @param options - Optional options to write the channel
1572
1595
  *
1573
1596
  */
1574
- writeChannel: writeChannel(join17(path7, "channels")),
1597
+ writeChannel: writeChannel(join18(path7, "channels")),
1575
1598
  /**
1576
1599
  * Remove an channel to EventCatalog (modeled on the standard POSIX rm utility)
1577
1600
  *
1578
1601
  * @param path - The path to your channel, e.g. `/Inventory/InventoryAdjusted`
1579
1602
  *
1580
1603
  */
1581
- rmChannel: rmChannel(join17(path7, "channels")),
1604
+ rmChannel: rmChannel(join18(path7, "channels")),
1582
1605
  /**
1583
1606
  * Remove an channel by an Event id
1584
1607
  *
1585
1608
  * @param id - The id of the channel you want to remove
1586
1609
  *
1587
1610
  */
1588
- rmChannelById: rmChannelById(join17(path7)),
1611
+ rmChannelById: rmChannelById(join18(path7)),
1589
1612
  /**
1590
1613
  * Moves a given channel id to the version directory
1591
1614
  * @param directory
1592
1615
  */
1593
- versionChannel: versionChannel(join17(path7)),
1616
+ versionChannel: versionChannel(join18(path7)),
1594
1617
  /**
1595
1618
  * Check to see if a channel version exists
1596
1619
  * @param id - The id of the channel
1597
1620
  * @param version - The version of the channel (supports semver)
1598
1621
  * @returns
1599
1622
  */
1600
- channelHasVersion: channelHasVersion(join17(path7)),
1623
+ channelHasVersion: channelHasVersion(join18(path7)),
1601
1624
  /**
1602
1625
  * Add a channel to an event
1603
1626
  *
@@ -1614,7 +1637,7 @@ var src_default = (path7) => {
1614
1637
  *
1615
1638
  * ```
1616
1639
  */
1617
- addEventToChannel: addMessageToChannel(join17(path7), "events"),
1640
+ addEventToChannel: addMessageToChannel(join18(path7), "events"),
1618
1641
  /**
1619
1642
  * Add a channel to an command
1620
1643
  *
@@ -1631,7 +1654,7 @@ var src_default = (path7) => {
1631
1654
  *
1632
1655
  * ```
1633
1656
  */
1634
- addCommandToChannel: addMessageToChannel(join17(path7), "commands"),
1657
+ addCommandToChannel: addMessageToChannel(join18(path7), "commands"),
1635
1658
  /**
1636
1659
  * Add a channel to an query
1637
1660
  *
@@ -1648,7 +1671,7 @@ var src_default = (path7) => {
1648
1671
  *
1649
1672
  * ```
1650
1673
  */
1651
- addQueryToChannel: addMessageToChannel(join17(path7), "queries"),
1674
+ addQueryToChannel: addMessageToChannel(join18(path7), "queries"),
1652
1675
  /**
1653
1676
  * ================================
1654
1677
  * SERVICES
@@ -1661,14 +1684,14 @@ var src_default = (path7) => {
1661
1684
  * @param options - Optional options to write the event
1662
1685
  *
1663
1686
  */
1664
- writeService: writeService(join17(path7, "services")),
1687
+ writeService: writeService(join18(path7, "services")),
1665
1688
  /**
1666
1689
  * Adds a versioned service to EventCatalog
1667
1690
  *
1668
1691
  * @param service - The service to write
1669
1692
  *
1670
1693
  */
1671
- writeVersionedService: writeVersionedService(join17(path7, "services")),
1694
+ writeVersionedService: writeVersionedService(join18(path7, "services")),
1672
1695
  /**
1673
1696
  * Adds a service to a domain in EventCatalog
1674
1697
  *
@@ -1677,45 +1700,45 @@ var src_default = (path7) => {
1677
1700
  * @param options - Optional options to write the event
1678
1701
  *
1679
1702
  */
1680
- writeServiceToDomain: writeServiceToDomain(join17(path7, "domains")),
1703
+ writeServiceToDomain: writeServiceToDomain(join18(path7, "domains")),
1681
1704
  /**
1682
1705
  * Returns a service from EventCatalog
1683
1706
  * @param id - The id of the service to retrieve
1684
1707
  * @param version - Optional id of the version to get (supports semver)
1685
1708
  * @returns Service|Undefined
1686
1709
  */
1687
- getService: getService(join17(path7)),
1710
+ getService: getService(join18(path7)),
1688
1711
  /**
1689
1712
  * Returns a service from EventCatalog by it's path.
1690
1713
  * @param path - The path to the service to retrieve
1691
1714
  * @returns Service|Undefined
1692
1715
  */
1693
- getServiceByPath: getServiceByPath(join17(path7)),
1716
+ getServiceByPath: getServiceByPath(join18(path7)),
1694
1717
  /**
1695
1718
  * Returns all services from EventCatalog
1696
1719
  * @param latestOnly - optional boolean, set to true to get only latest versions
1697
1720
  * @returns Service[]|Undefined
1698
1721
  */
1699
- getServices: getServices(join17(path7)),
1722
+ getServices: getServices(join18(path7)),
1700
1723
  /**
1701
1724
  * Moves a given service id to the version directory
1702
1725
  * @param directory
1703
1726
  */
1704
- versionService: versionService(join17(path7)),
1727
+ versionService: versionService(join18(path7)),
1705
1728
  /**
1706
1729
  * Remove a service from EventCatalog (modeled on the standard POSIX rm utility)
1707
1730
  *
1708
1731
  * @param path - The path to your service, e.g. `/InventoryService`
1709
1732
  *
1710
1733
  */
1711
- rmService: rmService(join17(path7, "services")),
1734
+ rmService: rmService(join18(path7, "services")),
1712
1735
  /**
1713
1736
  * Remove an service by an service id
1714
1737
  *
1715
1738
  * @param id - The id of the service you want to remove
1716
1739
  *
1717
1740
  */
1718
- rmServiceById: rmServiceById(join17(path7)),
1741
+ rmServiceById: rmServiceById(join18(path7)),
1719
1742
  /**
1720
1743
  * Adds a file to the given service
1721
1744
  * @param id - The id of the service to add the file to
@@ -1723,21 +1746,21 @@ var src_default = (path7) => {
1723
1746
  * @param version - Optional version of the service to add the file to
1724
1747
  * @returns
1725
1748
  */
1726
- addFileToService: addFileToService(join17(path7)),
1749
+ addFileToService: addFileToService(join18(path7)),
1727
1750
  /**
1728
1751
  * Returns the specifications for a given service
1729
1752
  * @param id - The id of the service to retrieve the specifications for
1730
1753
  * @param version - Optional version of the service
1731
1754
  * @returns
1732
1755
  */
1733
- getSpecificationFilesForService: getSpecificationFilesForService(join17(path7)),
1756
+ getSpecificationFilesForService: getSpecificationFilesForService(join18(path7)),
1734
1757
  /**
1735
1758
  * Check to see if a service version exists
1736
1759
  * @param id - The id of the service
1737
1760
  * @param version - The version of the service (supports semver)
1738
1761
  * @returns
1739
1762
  */
1740
- serviceHasVersion: serviceHasVersion(join17(path7)),
1763
+ serviceHasVersion: serviceHasVersion(join18(path7)),
1741
1764
  /**
1742
1765
  * Add an event to a service by it's id.
1743
1766
  *
@@ -1757,7 +1780,7 @@ var src_default = (path7) => {
1757
1780
  *
1758
1781
  * ```
1759
1782
  */
1760
- addEventToService: addMessageToService(join17(path7)),
1783
+ addEventToService: addMessageToService(join18(path7)),
1761
1784
  /**
1762
1785
  * Add a data store to a service by it's id.
1763
1786
  *
@@ -1774,7 +1797,7 @@ var src_default = (path7) => {
1774
1797
  *
1775
1798
  * ```
1776
1799
  */
1777
- addDataStoreToService: addDataStoreToService(join17(path7)),
1800
+ addDataStoreToService: addDataStoreToService(join18(path7)),
1778
1801
  /**
1779
1802
  * Add a command to a service by it's id.
1780
1803
  *
@@ -1794,7 +1817,7 @@ var src_default = (path7) => {
1794
1817
  *
1795
1818
  * ```
1796
1819
  */
1797
- addCommandToService: addMessageToService(join17(path7)),
1820
+ addCommandToService: addMessageToService(join18(path7)),
1798
1821
  /**
1799
1822
  * Add a query to a service by it's id.
1800
1823
  *
@@ -1814,7 +1837,7 @@ var src_default = (path7) => {
1814
1837
  *
1815
1838
  * ```
1816
1839
  */
1817
- addQueryToService: addMessageToService(join17(path7)),
1840
+ addQueryToService: addMessageToService(join18(path7)),
1818
1841
  /**
1819
1842
  * Add an entity to a service by its id.
1820
1843
  *
@@ -1832,7 +1855,7 @@ var src_default = (path7) => {
1832
1855
  *
1833
1856
  * ```
1834
1857
  */
1835
- addEntityToService: addEntityToService(join17(path7)),
1858
+ addEntityToService: addEntityToService(join18(path7)),
1836
1859
  /**
1837
1860
  * Check to see if a service exists by it's path.
1838
1861
  *
@@ -1849,13 +1872,13 @@ var src_default = (path7) => {
1849
1872
  * @param path - The path to the service to check
1850
1873
  * @returns boolean
1851
1874
  */
1852
- isService: isService(join17(path7)),
1875
+ isService: isService(join18(path7)),
1853
1876
  /**
1854
1877
  * Converts a file to a service.
1855
1878
  * @param file - The file to convert to a service.
1856
1879
  * @returns The service.
1857
1880
  */
1858
- toService: toService(join17(path7)),
1881
+ toService: toService(join18(path7)),
1859
1882
  /**
1860
1883
  * ================================
1861
1884
  * Domains
@@ -1868,39 +1891,39 @@ var src_default = (path7) => {
1868
1891
  * @param options - Optional options to write the event
1869
1892
  *
1870
1893
  */
1871
- writeDomain: writeDomain(join17(path7, "domains")),
1894
+ writeDomain: writeDomain(join18(path7, "domains")),
1872
1895
  /**
1873
1896
  * Returns a domain from EventCatalog
1874
1897
  * @param id - The id of the domain to retrieve
1875
1898
  * @param version - Optional id of the version to get (supports semver)
1876
1899
  * @returns Domain|Undefined
1877
1900
  */
1878
- getDomain: getDomain(join17(path7, "domains")),
1901
+ getDomain: getDomain(join18(path7, "domains")),
1879
1902
  /**
1880
1903
  * Returns all domains from EventCatalog
1881
1904
  * @param latestOnly - optional boolean, set to true to get only latest versions
1882
1905
  * @returns Domain[]|Undefined
1883
1906
  */
1884
- getDomains: getDomains(join17(path7)),
1907
+ getDomains: getDomains(join18(path7)),
1885
1908
  /**
1886
1909
  * Moves a given domain id to the version directory
1887
1910
  * @param directory
1888
1911
  */
1889
- versionDomain: versionDomain(join17(path7, "domains")),
1912
+ versionDomain: versionDomain(join18(path7, "domains")),
1890
1913
  /**
1891
1914
  * Remove a domain from EventCatalog (modeled on the standard POSIX rm utility)
1892
1915
  *
1893
1916
  * @param path - The path to your domain, e.g. `/Payment`
1894
1917
  *
1895
1918
  */
1896
- rmDomain: rmDomain(join17(path7, "domains")),
1919
+ rmDomain: rmDomain(join18(path7, "domains")),
1897
1920
  /**
1898
1921
  * Remove an service by an domain id
1899
1922
  *
1900
1923
  * @param id - The id of the domain you want to remove
1901
1924
  *
1902
1925
  */
1903
- rmDomainById: rmDomainById(join17(path7, "domains")),
1926
+ rmDomainById: rmDomainById(join18(path7, "domains")),
1904
1927
  /**
1905
1928
  * Adds a file to the given domain
1906
1929
  * @param id - The id of the domain to add the file to
@@ -1908,28 +1931,28 @@ var src_default = (path7) => {
1908
1931
  * @param version - Optional version of the domain to add the file to
1909
1932
  * @returns
1910
1933
  */
1911
- addFileToDomain: addFileToDomain(join17(path7, "domains")),
1934
+ addFileToDomain: addFileToDomain(join18(path7, "domains")),
1912
1935
  /**
1913
1936
  * Adds an ubiquitous language dictionary to a domain
1914
1937
  * @param id - The id of the domain to add the ubiquitous language to
1915
1938
  * @param ubiquitousLanguageDictionary - The ubiquitous language dictionary to add
1916
1939
  * @param version - Optional version of the domain to add the ubiquitous language to
1917
1940
  */
1918
- addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain(join17(path7, "domains")),
1941
+ addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain(join18(path7, "domains")),
1919
1942
  /**
1920
1943
  * Get the ubiquitous language dictionary from a domain
1921
1944
  * @param id - The id of the domain to get the ubiquitous language from
1922
1945
  * @param version - Optional version of the domain to get the ubiquitous language from
1923
1946
  * @returns
1924
1947
  */
1925
- getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain(join17(path7, "domains")),
1948
+ getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain(join18(path7, "domains")),
1926
1949
  /**
1927
1950
  * Check to see if a domain version exists
1928
1951
  * @param id - The id of the domain
1929
1952
  * @param version - The version of the domain (supports semver)
1930
1953
  * @returns
1931
1954
  */
1932
- domainHasVersion: domainHasVersion(join17(path7)),
1955
+ domainHasVersion: domainHasVersion(join18(path7)),
1933
1956
  /**
1934
1957
  * Adds a given service to a domain
1935
1958
  * @param id - The id of the domain
@@ -1937,7 +1960,7 @@ var src_default = (path7) => {
1937
1960
  * @param version - (Optional) The version of the domain to add the service to
1938
1961
  * @returns
1939
1962
  */
1940
- addServiceToDomain: addServiceToDomain(join17(path7, "domains")),
1963
+ addServiceToDomain: addServiceToDomain(join18(path7, "domains")),
1941
1964
  /**
1942
1965
  * Adds a given subdomain to a domain
1943
1966
  * @param id - The id of the domain
@@ -1945,7 +1968,7 @@ var src_default = (path7) => {
1945
1968
  * @param version - (Optional) The version of the domain to add the subdomain to
1946
1969
  * @returns
1947
1970
  */
1948
- addSubDomainToDomain: addSubDomainToDomain(join17(path7, "domains")),
1971
+ addSubDomainToDomain: addSubDomainToDomain(join18(path7, "domains")),
1949
1972
  /**
1950
1973
  * Adds an entity to a domain
1951
1974
  * @param id - The id of the domain
@@ -1953,7 +1976,7 @@ var src_default = (path7) => {
1953
1976
  * @param version - (Optional) The version of the domain to add the entity to
1954
1977
  * @returns
1955
1978
  */
1956
- addEntityToDomain: addEntityToDomain(join17(path7, "domains")),
1979
+ addEntityToDomain: addEntityToDomain(join18(path7, "domains")),
1957
1980
  /**
1958
1981
  * Add an event to a domain by its id.
1959
1982
  *
@@ -1971,7 +1994,7 @@ var src_default = (path7) => {
1971
1994
  *
1972
1995
  * ```
1973
1996
  */
1974
- addEventToDomain: addMessageToDomain(join17(path7, "domains")),
1997
+ addEventToDomain: addMessageToDomain(join18(path7, "domains")),
1975
1998
  /**
1976
1999
  * Add a command to a domain by its id.
1977
2000
  *
@@ -1989,7 +2012,7 @@ var src_default = (path7) => {
1989
2012
  *
1990
2013
  * ```
1991
2014
  */
1992
- addCommandToDomain: addMessageToDomain(join17(path7, "domains")),
2015
+ addCommandToDomain: addMessageToDomain(join18(path7, "domains")),
1993
2016
  /**
1994
2017
  * Add a query to a domain by its id.
1995
2018
  *
@@ -2007,7 +2030,7 @@ var src_default = (path7) => {
2007
2030
  *
2008
2031
  * ```
2009
2032
  */
2010
- addQueryToDomain: addMessageToDomain(join17(path7, "domains")),
2033
+ addQueryToDomain: addMessageToDomain(join18(path7, "domains")),
2011
2034
  /**
2012
2035
  * ================================
2013
2036
  * Teams
@@ -2020,25 +2043,25 @@ var src_default = (path7) => {
2020
2043
  * @param options - Optional options to write the team
2021
2044
  *
2022
2045
  */
2023
- writeTeam: writeTeam(join17(path7, "teams")),
2046
+ writeTeam: writeTeam(join18(path7, "teams")),
2024
2047
  /**
2025
2048
  * Returns a team from EventCatalog
2026
2049
  * @param id - The id of the team to retrieve
2027
2050
  * @returns Team|Undefined
2028
2051
  */
2029
- getTeam: getTeam(join17(path7, "teams")),
2052
+ getTeam: getTeam(join18(path7, "teams")),
2030
2053
  /**
2031
2054
  * Returns all teams from EventCatalog
2032
2055
  * @returns Team[]|Undefined
2033
2056
  */
2034
- getTeams: getTeams(join17(path7, "teams")),
2057
+ getTeams: getTeams(join18(path7, "teams")),
2035
2058
  /**
2036
2059
  * Remove a team by the team id
2037
2060
  *
2038
2061
  * @param id - The id of the team you want to remove
2039
2062
  *
2040
2063
  */
2041
- rmTeamById: rmTeamById(join17(path7, "teams")),
2064
+ rmTeamById: rmTeamById(join18(path7, "teams")),
2042
2065
  /**
2043
2066
  * ================================
2044
2067
  * Users
@@ -2051,25 +2074,25 @@ var src_default = (path7) => {
2051
2074
  * @param options - Optional options to write the user
2052
2075
  *
2053
2076
  */
2054
- writeUser: writeUser(join17(path7, "users")),
2077
+ writeUser: writeUser(join18(path7, "users")),
2055
2078
  /**
2056
2079
  * Returns a user from EventCatalog
2057
2080
  * @param id - The id of the user to retrieve
2058
2081
  * @returns User|Undefined
2059
2082
  */
2060
- getUser: getUser(join17(path7, "users")),
2083
+ getUser: getUser(join18(path7, "users")),
2061
2084
  /**
2062
2085
  * Returns all user from EventCatalog
2063
2086
  * @returns User[]|Undefined
2064
2087
  */
2065
- getUsers: getUsers(join17(path7)),
2088
+ getUsers: getUsers(join18(path7)),
2066
2089
  /**
2067
2090
  * Remove a user by the user id
2068
2091
  *
2069
2092
  * @param id - The id of the user you want to remove
2070
2093
  *
2071
2094
  */
2072
- rmUserById: rmUserById(join17(path7, "users")),
2095
+ rmUserById: rmUserById(join18(path7, "users")),
2073
2096
  /**
2074
2097
  * ================================
2075
2098
  * Custom Docs
@@ -2080,32 +2103,32 @@ var src_default = (path7) => {
2080
2103
  * @param path - The path to the custom doc to retrieve
2081
2104
  * @returns CustomDoc|Undefined
2082
2105
  */
2083
- getCustomDoc: getCustomDoc(join17(path7, "docs")),
2106
+ getCustomDoc: getCustomDoc(join18(path7, "docs")),
2084
2107
  /**
2085
2108
  * Returns all custom docs from EventCatalog
2086
2109
  * @param options - Optional options to get custom docs from a specific path
2087
2110
  * @returns CustomDoc[]|Undefined
2088
2111
  */
2089
- getCustomDocs: getCustomDocs(join17(path7, "docs")),
2112
+ getCustomDocs: getCustomDocs(join18(path7, "docs")),
2090
2113
  /**
2091
2114
  * Writes a custom doc to EventCatalog
2092
2115
  * @param customDoc - The custom doc to write
2093
2116
  * @param options - Optional options to write the custom doc
2094
2117
  *
2095
2118
  */
2096
- writeCustomDoc: writeCustomDoc(join17(path7, "docs")),
2119
+ writeCustomDoc: writeCustomDoc(join18(path7, "docs")),
2097
2120
  /**
2098
2121
  * Removes a custom doc from EventCatalog
2099
2122
  * @param path - The path to the custom doc to remove
2100
2123
  *
2101
2124
  */
2102
- rmCustomDoc: rmCustomDoc(join17(path7, "docs")),
2125
+ rmCustomDoc: rmCustomDoc(join18(path7, "docs")),
2103
2126
  /**
2104
2127
  * Dumps the catalog to a JSON file.
2105
2128
  * @param directory - The directory to dump the catalog to
2106
2129
  * @returns A JSON file with the catalog
2107
2130
  */
2108
- dumpCatalog: dumpCatalog(join17(path7)),
2131
+ dumpCatalog: dumpCatalog(join18(path7)),
2109
2132
  /**
2110
2133
  * Returns the event catalog configuration file.
2111
2134
  * The event catalog configuration file is the file that contains the configuration for the event catalog.
@@ -2113,7 +2136,7 @@ var src_default = (path7) => {
2113
2136
  * @param directory - The directory of the catalog.
2114
2137
  * @returns A JSON object with the configuration for the event catalog.
2115
2138
  */
2116
- getEventCatalogConfigurationFile: getEventCatalogConfigurationFile(join17(path7)),
2139
+ getEventCatalogConfigurationFile: getEventCatalogConfigurationFile(join18(path7)),
2117
2140
  /**
2118
2141
  * ================================
2119
2142
  * Resources Utils
@@ -2138,33 +2161,33 @@ var src_default = (path7) => {
2138
2161
  * @param path - The path to the message to retrieve
2139
2162
  * @returns Message|Undefined
2140
2163
  */
2141
- getMessageBySchemaPath: getMessageBySchemaPath(join17(path7)),
2164
+ getMessageBySchemaPath: getMessageBySchemaPath(join18(path7)),
2142
2165
  /**
2143
2166
  * Returns the producers and consumers (services) for a given message
2144
2167
  * @param id - The id of the message to get the producers and consumers for
2145
2168
  * @param version - Optional version of the message
2146
2169
  * @returns { producers: Service[], consumers: Service[] }
2147
2170
  */
2148
- getProducersAndConsumersForMessage: getProducersAndConsumersForMessage(join17(path7)),
2171
+ getProducersAndConsumersForMessage: getProducersAndConsumersForMessage(join18(path7)),
2149
2172
  /**
2150
2173
  * Returns the consumers of a given schema path
2151
2174
  * @param path - The path to the schema to get the consumers for
2152
2175
  * @returns Service[]
2153
2176
  */
2154
- getConsumersOfSchema: getConsumersOfSchema(join17(path7)),
2177
+ getConsumersOfSchema: getConsumersOfSchema(join18(path7)),
2155
2178
  /**
2156
2179
  * Returns the producers of a given schema path
2157
2180
  * @param path - The path to the schema to get the producers for
2158
2181
  * @returns Service[]
2159
2182
  */
2160
- getProducersOfSchema: getProducersOfSchema(join17(path7)),
2183
+ getProducersOfSchema: getProducersOfSchema(join18(path7)),
2161
2184
  /**
2162
2185
  * Returns the owners for a given resource (e.g domain, service, event, command, query, etc.)
2163
2186
  * @param id - The id of the resource to get the owners for
2164
2187
  * @param version - Optional version of the resource
2165
2188
  * @returns { owners: User[] }
2166
2189
  */
2167
- getOwnersForResource: getOwnersForResource(join17(path7)),
2190
+ getOwnersForResource: getOwnersForResource(join18(path7)),
2168
2191
  /**
2169
2192
  * ================================
2170
2193
  * Entities
@@ -2176,13 +2199,13 @@ var src_default = (path7) => {
2176
2199
  * @param version - Optional id of the version to get (supports semver)
2177
2200
  * @returns Entity|Undefined
2178
2201
  */
2179
- getEntity: getEntity(join17(path7)),
2202
+ getEntity: getEntity(join18(path7)),
2180
2203
  /**
2181
2204
  * Returns all entities from EventCatalog
2182
2205
  * @param latestOnly - optional boolean, set to true to get only latest versions
2183
2206
  * @returns Entity[]|Undefined
2184
2207
  */
2185
- getEntities: getEntities(join17(path7)),
2208
+ getEntities: getEntities(join18(path7)),
2186
2209
  /**
2187
2210
  * Adds an entity to EventCatalog
2188
2211
  *
@@ -2190,33 +2213,33 @@ var src_default = (path7) => {
2190
2213
  * @param options - Optional options to write the entity
2191
2214
  *
2192
2215
  */
2193
- writeEntity: writeEntity(join17(path7, "entities")),
2216
+ writeEntity: writeEntity(join18(path7, "entities")),
2194
2217
  /**
2195
2218
  * Remove an entity from EventCatalog (modeled on the standard POSIX rm utility)
2196
2219
  *
2197
2220
  * @param path - The path to your entity, e.g. `/User`
2198
2221
  *
2199
2222
  */
2200
- rmEntity: rmEntity(join17(path7, "entities")),
2223
+ rmEntity: rmEntity(join18(path7, "entities")),
2201
2224
  /**
2202
2225
  * Remove an entity by an entity id
2203
2226
  *
2204
2227
  * @param id - The id of the entity you want to remove
2205
2228
  *
2206
2229
  */
2207
- rmEntityById: rmEntityById(join17(path7)),
2230
+ rmEntityById: rmEntityById(join18(path7)),
2208
2231
  /**
2209
2232
  * Moves a given entity id to the version directory
2210
2233
  * @param id - The id of the entity to version
2211
2234
  */
2212
- versionEntity: versionEntity(join17(path7)),
2235
+ versionEntity: versionEntity(join18(path7)),
2213
2236
  /**
2214
2237
  * Check to see if an entity version exists
2215
2238
  * @param id - The id of the entity
2216
2239
  * @param version - The version of the entity (supports semver)
2217
2240
  * @returns
2218
2241
  */
2219
- entityHasVersion: entityHasVersion(join17(path7)),
2242
+ entityHasVersion: entityHasVersion(join18(path7)),
2220
2243
  /**
2221
2244
  * ================================
2222
2245
  * Data Stores
@@ -2228,42 +2251,42 @@ var src_default = (path7) => {
2228
2251
  * @param options - Optional options to write the data store
2229
2252
  *
2230
2253
  */
2231
- writeDataStore: writeDataStore(join17(path7, "containers")),
2254
+ writeDataStore: writeDataStore(join18(path7, "containers")),
2232
2255
  /**
2233
2256
  * Returns a data store from EventCatalog
2234
2257
  * @param id - The id of the data store to retrieve
2235
2258
  * @param version - Optional id of the version to get (supports semver)
2236
2259
  * @returns Container|Undefined
2237
2260
  */
2238
- getDataStore: getDataStore(join17(path7)),
2261
+ getDataStore: getDataStore(join18(path7)),
2239
2262
  /**
2240
2263
  * Returns all data stores from EventCatalog
2241
2264
  * @param latestOnly - optional boolean, set to true to get only latest versions
2242
2265
  * @returns Container[]|Undefined
2243
2266
  */
2244
- getDataStores: getDataStores(join17(path7)),
2267
+ getDataStores: getDataStores(join18(path7)),
2245
2268
  /**
2246
2269
  * Version a data store by its id
2247
2270
  * @param id - The id of the data store to version
2248
2271
  */
2249
- versionDataStore: versionDataStore(join17(path7, "containers")),
2272
+ versionDataStore: versionDataStore(join18(path7, "containers")),
2250
2273
  /**
2251
2274
  * Remove a data store by its path
2252
2275
  * @param path - The path to the data store to remove
2253
2276
  */
2254
- rmDataStore: rmDataStore(join17(path7, "containers")),
2277
+ rmDataStore: rmDataStore(join18(path7, "containers")),
2255
2278
  /**
2256
2279
  * Remove a data store by its id
2257
2280
  * @param id - The id of the data store to remove
2258
2281
  */
2259
- rmDataStoreById: rmDataStoreById(join17(path7)),
2282
+ rmDataStoreById: rmDataStoreById(join18(path7)),
2260
2283
  /**
2261
2284
  * Check to see if a data store version exists
2262
2285
  * @param id - The id of the data store
2263
2286
  * @param version - The version of the data store (supports semver)
2264
2287
  * @returns
2265
2288
  */
2266
- dataStoreHasVersion: dataStoreHasVersion(join17(path7)),
2289
+ dataStoreHasVersion: dataStoreHasVersion(join18(path7)),
2267
2290
  /**
2268
2291
  * Adds a file to a data store by its id
2269
2292
  * @param id - The id of the data store to add the file to
@@ -2271,14 +2294,14 @@ var src_default = (path7) => {
2271
2294
  * @param version - Optional version of the data store to add the file to
2272
2295
  * @returns
2273
2296
  */
2274
- addFileToDataStore: addFileToDataStore(join17(path7)),
2297
+ addFileToDataStore: addFileToDataStore(join18(path7)),
2275
2298
  /**
2276
2299
  * Writes a data store to a service by its id
2277
2300
  * @param dataStore - The data store to write
2278
2301
  * @param service - The service to write the data store to
2279
2302
  * @returns
2280
2303
  */
2281
- writeDataStoreToService: writeDataStoreToService(join17(path7)),
2304
+ writeDataStoreToService: writeDataStoreToService(join18(path7)),
2282
2305
  /**
2283
2306
  * ================================
2284
2307
  * Data Products
@@ -2290,7 +2313,7 @@ var src_default = (path7) => {
2290
2313
  * @param options - Optional options to write the data product
2291
2314
  *
2292
2315
  */
2293
- writeDataProduct: writeDataProduct(join17(path7, "data-products")),
2316
+ writeDataProduct: writeDataProduct(join18(path7, "data-products")),
2294
2317
  /**
2295
2318
  * Writes a data product to a domain in EventCatalog
2296
2319
  * @param dataProduct - The data product to write
@@ -2298,43 +2321,43 @@ var src_default = (path7) => {
2298
2321
  * @param options - Optional options to write the data product
2299
2322
  *
2300
2323
  */
2301
- writeDataProductToDomain: writeDataProductToDomain(join17(path7, "domains")),
2324
+ writeDataProductToDomain: writeDataProductToDomain(join18(path7, "domains")),
2302
2325
  /**
2303
2326
  * Returns a data product from EventCatalog
2304
2327
  * @param id - The id of the data product to retrieve
2305
2328
  * @param version - Optional id of the version to get (supports semver)
2306
2329
  * @returns DataProduct|Undefined
2307
2330
  */
2308
- getDataProduct: getDataProduct(join17(path7)),
2331
+ getDataProduct: getDataProduct(join18(path7)),
2309
2332
  /**
2310
2333
  * Returns all data products from EventCatalog
2311
2334
  * @param latestOnly - optional boolean, set to true to get only latest versions
2312
2335
  * @returns DataProduct[]|Undefined
2313
2336
  */
2314
- getDataProducts: getDataProducts(join17(path7)),
2337
+ getDataProducts: getDataProducts(join18(path7)),
2315
2338
  /**
2316
2339
  * Version a data product by its id
2317
2340
  * @param id - The id of the data product to version
2318
2341
  */
2319
- versionDataProduct: versionDataProduct(join17(path7)),
2342
+ versionDataProduct: versionDataProduct(join18(path7)),
2320
2343
  /**
2321
2344
  * Remove a data product by its path
2322
2345
  * @param path - The path to the data product to remove
2323
2346
  */
2324
- rmDataProduct: rmDataProduct(join17(path7, "data-products")),
2347
+ rmDataProduct: rmDataProduct(join18(path7, "data-products")),
2325
2348
  /**
2326
2349
  * Remove a data product by its id
2327
2350
  * @param id - The id of the data product to remove
2328
2351
  * @param version - Optional version of the data product to remove
2329
2352
  */
2330
- rmDataProductById: rmDataProductById(join17(path7)),
2353
+ rmDataProductById: rmDataProductById(join18(path7)),
2331
2354
  /**
2332
2355
  * Check to see if a data product version exists
2333
2356
  * @param id - The id of the data product
2334
2357
  * @param version - The version of the data product (supports semver)
2335
2358
  * @returns
2336
2359
  */
2337
- dataProductHasVersion: dataProductHasVersion(join17(path7)),
2360
+ dataProductHasVersion: dataProductHasVersion(join18(path7)),
2338
2361
  /**
2339
2362
  * Adds a file to a data product by its id
2340
2363
  * @param id - The id of the data product to add the file to
@@ -2342,7 +2365,7 @@ var src_default = (path7) => {
2342
2365
  * @param version - Optional version of the data product to add the file to
2343
2366
  * @returns
2344
2367
  */
2345
- addFileToDataProduct: addFileToDataProduct(join17(path7)),
2368
+ addFileToDataProduct: addFileToDataProduct(join18(path7)),
2346
2369
  /**
2347
2370
  * Adds a data product to a domain
2348
2371
  * @param id - The id of the domain
@@ -2350,7 +2373,67 @@ var src_default = (path7) => {
2350
2373
  * @param version - (Optional) The version of the domain to add the data product to
2351
2374
  * @returns
2352
2375
  */
2353
- addDataProductToDomain: addDataProductToDomain(join17(path7, "domains"))
2376
+ addDataProductToDomain: addDataProductToDomain(join18(path7, "domains")),
2377
+ /**
2378
+ * ================================
2379
+ * Diagrams
2380
+ * ================================
2381
+ */
2382
+ /**
2383
+ * Returns a diagram from EventCatalog
2384
+ * @param id - The id of the diagram to retrieve
2385
+ * @param version - Optional id of the version to get (supports semver)
2386
+ * @returns Diagram|Undefined
2387
+ */
2388
+ getDiagram: getDiagram(join18(path7)),
2389
+ /**
2390
+ * Returns all diagrams from EventCatalog
2391
+ * @param latestOnly - optional boolean, set to true to get only latest versions
2392
+ * @returns Diagram[]|Undefined
2393
+ */
2394
+ getDiagrams: getDiagrams(join18(path7)),
2395
+ /**
2396
+ * Adds a diagram to EventCatalog
2397
+ *
2398
+ * @param diagram - The diagram to write
2399
+ * @param options - Optional options to write the diagram
2400
+ *
2401
+ */
2402
+ writeDiagram: writeDiagram(join18(path7, "diagrams")),
2403
+ /**
2404
+ * Remove a diagram from EventCatalog (modeled on the standard POSIX rm utility)
2405
+ *
2406
+ * @param path - The path to your diagram, e.g. `/ArchitectureDiagram`
2407
+ *
2408
+ */
2409
+ rmDiagram: rmDiagram(join18(path7, "diagrams")),
2410
+ /**
2411
+ * Remove a diagram by a diagram id
2412
+ *
2413
+ * @param id - The id of the diagram you want to remove
2414
+ *
2415
+ */
2416
+ rmDiagramById: rmDiagramById(join18(path7)),
2417
+ /**
2418
+ * Moves a given diagram id to the version directory
2419
+ * @param id - The id of the diagram to version
2420
+ */
2421
+ versionDiagram: versionDiagram(join18(path7)),
2422
+ /**
2423
+ * Check to see if a diagram version exists
2424
+ * @param id - The id of the diagram
2425
+ * @param version - The version of the diagram (supports semver)
2426
+ * @returns
2427
+ */
2428
+ diagramHasVersion: diagramHasVersion(join18(path7)),
2429
+ /**
2430
+ * Adds a file to the given diagram
2431
+ * @param id - The id of the diagram to add the file to
2432
+ * @param file - File contents to add including the content and the file name
2433
+ * @param version - Optional version of the diagram to add the file to
2434
+ * @returns
2435
+ */
2436
+ addFileToDiagram: addFileToDiagram(join18(path7))
2354
2437
  };
2355
2438
  };
2356
2439