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