@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.d.mts CHANGED
@@ -262,6 +262,15 @@ interface Entity extends BaseSchema {
262
262
  };
263
263
  }
264
264
 
265
+ interface Diagram extends BaseSchema {
266
+ detailsPanel?: {
267
+ versions?: DetailPanelProperty;
268
+ owners?: DetailPanelProperty;
269
+ changelog?: DetailPanelProperty;
270
+ attachments?: DetailPanelProperty;
271
+ };
272
+ }
273
+
265
274
  type DataProductOutputPointer = {
266
275
  id: string;
267
276
  version?: string;
@@ -806,7 +815,23 @@ declare const _default: (path: string) => {
806
815
  writeServiceToDomain: (service: Service, domain: {
807
816
  id: string;
808
817
  version?: string;
809
- direction?: string;
818
+ direction
819
+ /**
820
+ * Adds a command to a service in EventCatalog
821
+ *
822
+ * @param command - The command to write to the service
823
+ * @param service - The service and it's id to write to the command to
824
+ * @param options - Optional options to write the command
825
+ *
826
+ */
827
+ ? /**
828
+ * Adds a command to a service in EventCatalog
829
+ *
830
+ * @param command - The command to write to the service
831
+ * @param service - The service and it's id to write to the command to
832
+ * @param options - Optional options to write the command
833
+ *
834
+ */: string;
810
835
  }, options?: {
811
836
  path?: string;
812
837
  format?: "md" | "mdx";
@@ -1023,14 +1048,7 @@ declare const _default: (path: string) => {
1023
1048
  *
1024
1049
  */
1025
1050
  writeDomain: (domain: Domain, options?: {
1026
- path? /**
1027
- * Adds an event to a service in EventCatalog
1028
- *
1029
- * @param event - The event to write to the service
1030
- * @param service - The service and it's id to write to the event to
1031
- * @param options - Optional options to write the event
1032
- *
1033
- */: string;
1051
+ path?: string;
1034
1052
  override?: boolean;
1035
1053
  versionExistingContent?: boolean;
1036
1054
  format?: "md" | "mdx";
@@ -1513,12 +1531,7 @@ declare const _default: (path: string) => {
1513
1531
  }, options?: {
1514
1532
  path?: string;
1515
1533
  format?: "md" | "mdx";
1516
- override? /**
1517
- * Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
1518
- *
1519
- * @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
1520
- *
1521
- */: boolean;
1534
+ override?: boolean;
1522
1535
  }) => Promise<void>;
1523
1536
  /**
1524
1537
  * ================================
@@ -1550,13 +1563,7 @@ declare const _default: (path: string) => {
1550
1563
  }, options?: {
1551
1564
  path?: string;
1552
1565
  format?: "md" | "mdx";
1553
- override? /**
1554
- * Adds a schema to the given event
1555
- * @param id - The id of the event to add the schema to
1556
- * @param schema - Schema contents to add including the content and the file name
1557
- * @param version - Optional version of the event to add the schema to
1558
- * @returns
1559
- */: boolean;
1566
+ override?: boolean;
1560
1567
  }) => Promise<void>;
1561
1568
  /**
1562
1569
  * Returns a data product from EventCatalog
@@ -1618,6 +1625,90 @@ declare const _default: (path: string) => {
1618
1625
  id: string;
1619
1626
  version: string;
1620
1627
  }, version?: string) => Promise<void>;
1628
+ /**
1629
+ * ================================
1630
+ * Diagrams
1631
+ * ================================
1632
+ */
1633
+ /**
1634
+ * Returns a diagram from EventCatalog
1635
+ * @param id - The id of the diagram to retrieve
1636
+ * @param version - Optional id of the version to get (supports semver)
1637
+ * @returns Diagram|Undefined
1638
+ */
1639
+ getDiagram: (id: string, version?: string) => Promise<Diagram>;
1640
+ /**
1641
+ * Returns all diagrams from EventCatalog
1642
+ * @param latestOnly - optional boolean, set to true to get only latest versions
1643
+ * @returns Diagram[]|Undefined
1644
+ */
1645
+ getDiagrams: (options?: {
1646
+ latestOnly?: boolean;
1647
+ }) => Promise<Diagram[]>;
1648
+ /**
1649
+ * Adds a diagram to EventCatalog
1650
+ *
1651
+ * @param diagram - The diagram to write
1652
+ * @param options - Optional options to write the diagram
1653
+ *
1654
+ */
1655
+ writeDiagram: (diagram: Diagram, options?: {
1656
+ path
1657
+ /**
1658
+ * Adds an event to EventCatalog
1659
+ *
1660
+ * @param event - The event to write
1661
+ * @param options - Optional options to write the event
1662
+ *
1663
+ */
1664
+ ? /**
1665
+ * Adds an event to EventCatalog
1666
+ *
1667
+ * @param event - The event to write
1668
+ * @param options - Optional options to write the event
1669
+ *
1670
+ */: string;
1671
+ override?: boolean;
1672
+ versionExistingContent?: boolean;
1673
+ format?: "md" | "mdx";
1674
+ }) => Promise<void>;
1675
+ /**
1676
+ * Remove a diagram from EventCatalog (modeled on the standard POSIX rm utility)
1677
+ *
1678
+ * @param path - The path to your diagram, e.g. `/ArchitectureDiagram`
1679
+ *
1680
+ */
1681
+ rmDiagram: (path: string) => Promise<void>;
1682
+ /**
1683
+ * Remove a diagram by a diagram id
1684
+ *
1685
+ * @param id - The id of the diagram you want to remove
1686
+ *
1687
+ */
1688
+ rmDiagramById: (id: string, version?: string, persistFiles?: boolean) => Promise<void>;
1689
+ /**
1690
+ * Moves a given diagram id to the version directory
1691
+ * @param id - The id of the diagram to version
1692
+ */
1693
+ versionDiagram: (id: string) => Promise<void>;
1694
+ /**
1695
+ * Check to see if a diagram version exists
1696
+ * @param id - The id of the diagram
1697
+ * @param version - The version of the diagram (supports semver)
1698
+ * @returns
1699
+ */
1700
+ diagramHasVersion: (id: string, version?: string) => Promise<boolean>;
1701
+ /**
1702
+ * Adds a file to the given diagram
1703
+ * @param id - The id of the diagram to add the file to
1704
+ * @param file - File contents to add including the content and the file name
1705
+ * @param version - Optional version of the diagram to add the file to
1706
+ * @returns
1707
+ */
1708
+ addFileToDiagram: (id: string, file: {
1709
+ content: string;
1710
+ fileName: string;
1711
+ }, version?: string) => Promise<void>;
1621
1712
  };
1622
1713
 
1623
- export { type Badge, type BaseSchema, type Channel, type ChannelPointer, type Command, type Container, type CustomDoc, type DataProduct, type DataProductOutputPointer, type Domain, type Entity, type Event, type EventCatalog, type Message, type Query, type ReceivesPointer, type ResourceGroup, type ResourcePointer, type SendsPointer, type Service, type Specification, type Specifications, type Team, type UbiquitousLanguage, type UbiquitousLanguageDictionary, type User, _default as default };
1714
+ export { type Badge, type BaseSchema, type Channel, type ChannelPointer, type Command, type Container, type CustomDoc, type DataProduct, type DataProductOutputPointer, type Diagram, type Domain, type Entity, type Event, type EventCatalog, type Message, type Query, type ReceivesPointer, type ResourceGroup, type ResourcePointer, type SendsPointer, type Service, type Specification, type Specifications, type Team, type UbiquitousLanguage, type UbiquitousLanguageDictionary, type User, _default as default };
package/dist/index.d.ts CHANGED
@@ -262,6 +262,15 @@ interface Entity extends BaseSchema {
262
262
  };
263
263
  }
264
264
 
265
+ interface Diagram extends BaseSchema {
266
+ detailsPanel?: {
267
+ versions?: DetailPanelProperty;
268
+ owners?: DetailPanelProperty;
269
+ changelog?: DetailPanelProperty;
270
+ attachments?: DetailPanelProperty;
271
+ };
272
+ }
273
+
265
274
  type DataProductOutputPointer = {
266
275
  id: string;
267
276
  version?: string;
@@ -806,7 +815,23 @@ declare const _default: (path: string) => {
806
815
  writeServiceToDomain: (service: Service, domain: {
807
816
  id: string;
808
817
  version?: string;
809
- direction?: string;
818
+ direction
819
+ /**
820
+ * Adds a command to a service in EventCatalog
821
+ *
822
+ * @param command - The command to write to the service
823
+ * @param service - The service and it's id to write to the command to
824
+ * @param options - Optional options to write the command
825
+ *
826
+ */
827
+ ? /**
828
+ * Adds a command to a service in EventCatalog
829
+ *
830
+ * @param command - The command to write to the service
831
+ * @param service - The service and it's id to write to the command to
832
+ * @param options - Optional options to write the command
833
+ *
834
+ */: string;
810
835
  }, options?: {
811
836
  path?: string;
812
837
  format?: "md" | "mdx";
@@ -1023,14 +1048,7 @@ declare const _default: (path: string) => {
1023
1048
  *
1024
1049
  */
1025
1050
  writeDomain: (domain: Domain, options?: {
1026
- path? /**
1027
- * Adds an event to a service in EventCatalog
1028
- *
1029
- * @param event - The event to write to the service
1030
- * @param service - The service and it's id to write to the event to
1031
- * @param options - Optional options to write the event
1032
- *
1033
- */: string;
1051
+ path?: string;
1034
1052
  override?: boolean;
1035
1053
  versionExistingContent?: boolean;
1036
1054
  format?: "md" | "mdx";
@@ -1513,12 +1531,7 @@ declare const _default: (path: string) => {
1513
1531
  }, options?: {
1514
1532
  path?: string;
1515
1533
  format?: "md" | "mdx";
1516
- override? /**
1517
- * Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
1518
- *
1519
- * @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
1520
- *
1521
- */: boolean;
1534
+ override?: boolean;
1522
1535
  }) => Promise<void>;
1523
1536
  /**
1524
1537
  * ================================
@@ -1550,13 +1563,7 @@ declare const _default: (path: string) => {
1550
1563
  }, options?: {
1551
1564
  path?: string;
1552
1565
  format?: "md" | "mdx";
1553
- override? /**
1554
- * Adds a schema to the given event
1555
- * @param id - The id of the event to add the schema to
1556
- * @param schema - Schema contents to add including the content and the file name
1557
- * @param version - Optional version of the event to add the schema to
1558
- * @returns
1559
- */: boolean;
1566
+ override?: boolean;
1560
1567
  }) => Promise<void>;
1561
1568
  /**
1562
1569
  * Returns a data product from EventCatalog
@@ -1618,6 +1625,90 @@ declare const _default: (path: string) => {
1618
1625
  id: string;
1619
1626
  version: string;
1620
1627
  }, version?: string) => Promise<void>;
1628
+ /**
1629
+ * ================================
1630
+ * Diagrams
1631
+ * ================================
1632
+ */
1633
+ /**
1634
+ * Returns a diagram from EventCatalog
1635
+ * @param id - The id of the diagram to retrieve
1636
+ * @param version - Optional id of the version to get (supports semver)
1637
+ * @returns Diagram|Undefined
1638
+ */
1639
+ getDiagram: (id: string, version?: string) => Promise<Diagram>;
1640
+ /**
1641
+ * Returns all diagrams from EventCatalog
1642
+ * @param latestOnly - optional boolean, set to true to get only latest versions
1643
+ * @returns Diagram[]|Undefined
1644
+ */
1645
+ getDiagrams: (options?: {
1646
+ latestOnly?: boolean;
1647
+ }) => Promise<Diagram[]>;
1648
+ /**
1649
+ * Adds a diagram to EventCatalog
1650
+ *
1651
+ * @param diagram - The diagram to write
1652
+ * @param options - Optional options to write the diagram
1653
+ *
1654
+ */
1655
+ writeDiagram: (diagram: Diagram, options?: {
1656
+ path
1657
+ /**
1658
+ * Adds an event to EventCatalog
1659
+ *
1660
+ * @param event - The event to write
1661
+ * @param options - Optional options to write the event
1662
+ *
1663
+ */
1664
+ ? /**
1665
+ * Adds an event to EventCatalog
1666
+ *
1667
+ * @param event - The event to write
1668
+ * @param options - Optional options to write the event
1669
+ *
1670
+ */: string;
1671
+ override?: boolean;
1672
+ versionExistingContent?: boolean;
1673
+ format?: "md" | "mdx";
1674
+ }) => Promise<void>;
1675
+ /**
1676
+ * Remove a diagram from EventCatalog (modeled on the standard POSIX rm utility)
1677
+ *
1678
+ * @param path - The path to your diagram, e.g. `/ArchitectureDiagram`
1679
+ *
1680
+ */
1681
+ rmDiagram: (path: string) => Promise<void>;
1682
+ /**
1683
+ * Remove a diagram by a diagram id
1684
+ *
1685
+ * @param id - The id of the diagram you want to remove
1686
+ *
1687
+ */
1688
+ rmDiagramById: (id: string, version?: string, persistFiles?: boolean) => Promise<void>;
1689
+ /**
1690
+ * Moves a given diagram id to the version directory
1691
+ * @param id - The id of the diagram to version
1692
+ */
1693
+ versionDiagram: (id: string) => Promise<void>;
1694
+ /**
1695
+ * Check to see if a diagram version exists
1696
+ * @param id - The id of the diagram
1697
+ * @param version - The version of the diagram (supports semver)
1698
+ * @returns
1699
+ */
1700
+ diagramHasVersion: (id: string, version?: string) => Promise<boolean>;
1701
+ /**
1702
+ * Adds a file to the given diagram
1703
+ * @param id - The id of the diagram to add the file to
1704
+ * @param file - File contents to add including the content and the file name
1705
+ * @param version - Optional version of the diagram to add the file to
1706
+ * @returns
1707
+ */
1708
+ addFileToDiagram: (id: string, file: {
1709
+ content: string;
1710
+ fileName: string;
1711
+ }, version?: string) => Promise<void>;
1621
1712
  };
1622
1713
 
1623
- export { type Badge, type BaseSchema, type Channel, type ChannelPointer, type Command, type Container, type CustomDoc, type DataProduct, type DataProductOutputPointer, type Domain, type Entity, type Event, type EventCatalog, type Message, type Query, type ReceivesPointer, type ResourceGroup, type ResourcePointer, type SendsPointer, type Service, type Specification, type Specifications, type Team, type UbiquitousLanguage, type UbiquitousLanguageDictionary, type User, _default as default };
1714
+ export { type Badge, type BaseSchema, type Channel, type ChannelPointer, type Command, type Container, type CustomDoc, type DataProduct, type DataProductOutputPointer, type Diagram, type Domain, type Entity, type Event, type EventCatalog, type Message, type Query, type ReceivesPointer, type ResourceGroup, type ResourcePointer, type SendsPointer, type Service, type Specification, type Specifications, type Team, type UbiquitousLanguage, type UbiquitousLanguageDictionary, type User, _default as default };