@eventcatalog/sdk 2.15.1 → 2.16.0

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
@@ -235,6 +235,12 @@ interface Badge {
235
235
  icon?: string;
236
236
  }
237
237
 
238
+ interface Changelog {
239
+ createdAt: Date | string;
240
+ badges?: Badge[];
241
+ markdown: string;
242
+ }
243
+
238
244
  interface UbiquitousLanguage {
239
245
  id: string;
240
246
  name: string;
@@ -746,18 +752,7 @@ declare const _default: (path: string) => {
746
752
  addEventToChannel: (id: string, _message: {
747
753
  id: string;
748
754
  version: string;
749
- parameters
750
- /**
751
- * Returns a query from EventCatalog
752
- * @param id - The id of the query to retrieve
753
- * @param version - Optional id of the version to get (supports semver)
754
- * @returns Query|Undefined
755
- */
756
- ? /**
757
- * ================================
758
- * Queries
759
- * ================================
760
- */: {
755
+ parameters?: {
761
756
  [key: string]: string;
762
757
  };
763
758
  }, version?: string) => Promise<void>;
@@ -780,18 +775,7 @@ declare const _default: (path: string) => {
780
775
  addCommandToChannel: (id: string, _message: {
781
776
  id: string;
782
777
  version: string;
783
- parameters
784
- /**
785
- * Returns a query from EventCatalog
786
- * @param id - The id of the query to retrieve
787
- * @param version - Optional id of the version to get (supports semver)
788
- * @returns Query|Undefined
789
- */
790
- ? /**
791
- * ================================
792
- * Queries
793
- * ================================
794
- */: {
778
+ parameters?: {
795
779
  [key: string]: string;
796
780
  };
797
781
  }, version?: string) => Promise<void>;
@@ -814,18 +798,7 @@ declare const _default: (path: string) => {
814
798
  addQueryToChannel: (id: string, _message: {
815
799
  id: string;
816
800
  version: string;
817
- parameters
818
- /**
819
- * Returns a query from EventCatalog
820
- * @param id - The id of the query to retrieve
821
- * @param version - Optional id of the version to get (supports semver)
822
- * @returns Query|Undefined
823
- */
824
- ? /**
825
- * ================================
826
- * Queries
827
- * ================================
828
- */: {
801
+ parameters?: {
829
802
  [key: string]: string;
830
803
  };
831
804
  }, version?: string) => Promise<void>;
@@ -844,15 +817,7 @@ declare const _default: (path: string) => {
844
817
  writeService: (service: Service, options?: {
845
818
  path?: string;
846
819
  override?: boolean;
847
- versionExistingContent
848
- /**
849
- * Moves a given event id to the version directory
850
- * @param directory
851
- */
852
- ? /**
853
- * Moves a given event id to the version directory
854
- * @param directory
855
- */: boolean;
820
+ versionExistingContent?: boolean;
856
821
  format?: "md" | "mdx";
857
822
  }) => Promise<void>;
858
823
  /**
@@ -1375,6 +1340,56 @@ declare const _default: (path: string) => {
1375
1340
  * @returns A JSON object with the configuration for the event catalog.
1376
1341
  */
1377
1342
  getEventCatalogConfigurationFile: () => Promise<any>;
1343
+ /**
1344
+ * ================================
1345
+ * Changelogs
1346
+ * ================================
1347
+ */
1348
+ /**
1349
+ * Writes a changelog entry to a resource in EventCatalog
1350
+ *
1351
+ * @param id - The id of the resource to write the changelog to
1352
+ * @param changelog - The changelog entry to write
1353
+ * @param options - Optional options (version, format)
1354
+ *
1355
+ */
1356
+ writeChangelog: (id: string, changelog: Changelog, options?: {
1357
+ version?: string;
1358
+ format?: "md" | "mdx";
1359
+ }) => Promise<void>;
1360
+ /**
1361
+ * Appends a changelog entry to an existing changelog for a resource.
1362
+ * If no changelog exists, one is created.
1363
+ *
1364
+ * @param id - The id of the resource to append the changelog to
1365
+ * @param changelog - The changelog entry to append
1366
+ * @param options - Optional options (version, format)
1367
+ *
1368
+ */
1369
+ appendChangelog: (id: string, changelog: Changelog, options?: {
1370
+ version?: string;
1371
+ format?: "md" | "mdx";
1372
+ }) => Promise<void>;
1373
+ /**
1374
+ * Returns the changelog for a resource in EventCatalog
1375
+ *
1376
+ * @param id - The id of the resource to get the changelog for
1377
+ * @param options - Optional options (version)
1378
+ * @returns Changelog|Undefined
1379
+ */
1380
+ getChangelog: (id: string, options?: {
1381
+ version?: string;
1382
+ }) => Promise<Changelog | undefined>;
1383
+ /**
1384
+ * Removes the changelog for a resource in EventCatalog
1385
+ *
1386
+ * @param id - The id of the resource to remove the changelog from
1387
+ * @param options - Optional options (version)
1388
+ *
1389
+ */
1390
+ rmChangelog: (id: string, options?: {
1391
+ version?: string;
1392
+ }) => Promise<void>;
1378
1393
  /**
1379
1394
  * ================================
1380
1395
  * Resources Utils
@@ -1758,4 +1773,4 @@ declare const _default: (path: string) => {
1758
1773
  toDSL: (resource: (Event | Command | Query | Service | Domain) | (Event | Command | Query | Service | Domain)[], options: ToDSLOptions) => Promise<string>;
1759
1774
  };
1760
1775
 
1761
- 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 Operation, 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 };
1776
+ export { type Badge, type BaseSchema, type Changelog, 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 Operation, 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
@@ -235,6 +235,12 @@ interface Badge {
235
235
  icon?: string;
236
236
  }
237
237
 
238
+ interface Changelog {
239
+ createdAt: Date | string;
240
+ badges?: Badge[];
241
+ markdown: string;
242
+ }
243
+
238
244
  interface UbiquitousLanguage {
239
245
  id: string;
240
246
  name: string;
@@ -746,18 +752,7 @@ declare const _default: (path: string) => {
746
752
  addEventToChannel: (id: string, _message: {
747
753
  id: string;
748
754
  version: string;
749
- parameters
750
- /**
751
- * Returns a query from EventCatalog
752
- * @param id - The id of the query to retrieve
753
- * @param version - Optional id of the version to get (supports semver)
754
- * @returns Query|Undefined
755
- */
756
- ? /**
757
- * ================================
758
- * Queries
759
- * ================================
760
- */: {
755
+ parameters?: {
761
756
  [key: string]: string;
762
757
  };
763
758
  }, version?: string) => Promise<void>;
@@ -780,18 +775,7 @@ declare const _default: (path: string) => {
780
775
  addCommandToChannel: (id: string, _message: {
781
776
  id: string;
782
777
  version: string;
783
- parameters
784
- /**
785
- * Returns a query from EventCatalog
786
- * @param id - The id of the query to retrieve
787
- * @param version - Optional id of the version to get (supports semver)
788
- * @returns Query|Undefined
789
- */
790
- ? /**
791
- * ================================
792
- * Queries
793
- * ================================
794
- */: {
778
+ parameters?: {
795
779
  [key: string]: string;
796
780
  };
797
781
  }, version?: string) => Promise<void>;
@@ -814,18 +798,7 @@ declare const _default: (path: string) => {
814
798
  addQueryToChannel: (id: string, _message: {
815
799
  id: string;
816
800
  version: string;
817
- parameters
818
- /**
819
- * Returns a query from EventCatalog
820
- * @param id - The id of the query to retrieve
821
- * @param version - Optional id of the version to get (supports semver)
822
- * @returns Query|Undefined
823
- */
824
- ? /**
825
- * ================================
826
- * Queries
827
- * ================================
828
- */: {
801
+ parameters?: {
829
802
  [key: string]: string;
830
803
  };
831
804
  }, version?: string) => Promise<void>;
@@ -844,15 +817,7 @@ declare const _default: (path: string) => {
844
817
  writeService: (service: Service, options?: {
845
818
  path?: string;
846
819
  override?: boolean;
847
- versionExistingContent
848
- /**
849
- * Moves a given event id to the version directory
850
- * @param directory
851
- */
852
- ? /**
853
- * Moves a given event id to the version directory
854
- * @param directory
855
- */: boolean;
820
+ versionExistingContent?: boolean;
856
821
  format?: "md" | "mdx";
857
822
  }) => Promise<void>;
858
823
  /**
@@ -1375,6 +1340,56 @@ declare const _default: (path: string) => {
1375
1340
  * @returns A JSON object with the configuration for the event catalog.
1376
1341
  */
1377
1342
  getEventCatalogConfigurationFile: () => Promise<any>;
1343
+ /**
1344
+ * ================================
1345
+ * Changelogs
1346
+ * ================================
1347
+ */
1348
+ /**
1349
+ * Writes a changelog entry to a resource in EventCatalog
1350
+ *
1351
+ * @param id - The id of the resource to write the changelog to
1352
+ * @param changelog - The changelog entry to write
1353
+ * @param options - Optional options (version, format)
1354
+ *
1355
+ */
1356
+ writeChangelog: (id: string, changelog: Changelog, options?: {
1357
+ version?: string;
1358
+ format?: "md" | "mdx";
1359
+ }) => Promise<void>;
1360
+ /**
1361
+ * Appends a changelog entry to an existing changelog for a resource.
1362
+ * If no changelog exists, one is created.
1363
+ *
1364
+ * @param id - The id of the resource to append the changelog to
1365
+ * @param changelog - The changelog entry to append
1366
+ * @param options - Optional options (version, format)
1367
+ *
1368
+ */
1369
+ appendChangelog: (id: string, changelog: Changelog, options?: {
1370
+ version?: string;
1371
+ format?: "md" | "mdx";
1372
+ }) => Promise<void>;
1373
+ /**
1374
+ * Returns the changelog for a resource in EventCatalog
1375
+ *
1376
+ * @param id - The id of the resource to get the changelog for
1377
+ * @param options - Optional options (version)
1378
+ * @returns Changelog|Undefined
1379
+ */
1380
+ getChangelog: (id: string, options?: {
1381
+ version?: string;
1382
+ }) => Promise<Changelog | undefined>;
1383
+ /**
1384
+ * Removes the changelog for a resource in EventCatalog
1385
+ *
1386
+ * @param id - The id of the resource to remove the changelog from
1387
+ * @param options - Optional options (version)
1388
+ *
1389
+ */
1390
+ rmChangelog: (id: string, options?: {
1391
+ version?: string;
1392
+ }) => Promise<void>;
1378
1393
  /**
1379
1394
  * ================================
1380
1395
  * Resources Utils
@@ -1758,4 +1773,4 @@ declare const _default: (path: string) => {
1758
1773
  toDSL: (resource: (Event | Command | Query | Service | Domain) | (Event | Command | Query | Service | Domain)[], options: ToDSLOptions) => Promise<string>;
1759
1774
  };
1760
1775
 
1761
- 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 Operation, 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 };
1776
+ export { type Badge, type BaseSchema, type Changelog, 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 Operation, 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 };