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