@eventcatalog/sdk 2.26.3 → 2.27.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
@@ -1,3 +1,5 @@
1
+ import { z } from 'zod';
2
+
1
3
  interface ExtensionProperties {
2
4
  [key: `x-${string}`]: unknown;
3
5
  }
@@ -658,6 +660,140 @@ interface ToDSLOptions {
658
660
  hydrate?: boolean;
659
661
  }
660
662
 
663
+ type IndexResourceType = 'adr' | 'agent' | 'channel' | 'command' | 'container' | 'data-product' | 'diagram' | 'domain' | 'entity' | 'event' | 'flow' | 'query' | 'service' | 'system' | 'team' | 'user';
664
+ type IndexSchema = Omit<SchemaPointer, 'file'> & {
665
+ hash?: string;
666
+ };
667
+ type IndexSpecification = Specification & {
668
+ hash?: string;
669
+ };
670
+ type IndexSidecar = {
671
+ path: string;
672
+ hash?: string;
673
+ };
674
+ type IndexAsset = {
675
+ path: string;
676
+ hash?: string;
677
+ };
678
+ type IndexReference = ResourcePointer & {
679
+ kind: 'agent' | 'container' | 'data-product' | 'flow' | 'message' | 'service';
680
+ };
681
+ type IndexResource = {
682
+ type: IndexResourceType;
683
+ id: string;
684
+ version?: string;
685
+ name: string;
686
+ contentPath: string;
687
+ contentHash?: string;
688
+ draft?: BaseSchema['draft'];
689
+ deprecated?: BaseSchema['deprecated'];
690
+ owners?: string[];
691
+ diagrams?: ResourcePointer[];
692
+ schemas?: IndexSchema[];
693
+ specifications?: IndexSpecification[];
694
+ sidecars?: IndexSidecar[];
695
+ container_type?: Container['container_type'];
696
+ references?: IndexReference[];
697
+ sends?: SendsPointer[];
698
+ receives?: ReceivesPointer[];
699
+ channels?: ChannelPointer[];
700
+ address?: Channel['address'];
701
+ protocols?: Channel['protocols'];
702
+ deliveryGuarantee?: Channel['deliveryGuarantee'];
703
+ routes?: Channel['routes'];
704
+ parameters?: Channel['parameters'];
705
+ services?: ResourcePointer[];
706
+ agents?: ResourcePointer[];
707
+ domains?: ResourcePointer[];
708
+ systems?: ResourcePointer[];
709
+ entities?: ResourcePointer[];
710
+ dataProducts?: ResourcePointer[];
711
+ flows?: ResourcePointer[];
712
+ writesTo?: ResourcePointer[];
713
+ readsFrom?: ResourcePointer[];
714
+ containers?: ResourcePointer[];
715
+ relationships?: SystemRelationshipPointer[];
716
+ actors?: SystemActorRelationship[];
717
+ inputs?: ResourcePointer[];
718
+ outputs?: DataProductOutputPointer[];
719
+ status?: AdrStatus;
720
+ appliesTo?: AdrResourcePointer[];
721
+ supersedes?: AdrPointer[];
722
+ supersededBy?: AdrPointer[];
723
+ amends?: AdrPointer[];
724
+ amendedBy?: AdrPointer[];
725
+ related?: AdrPointer[];
726
+ members?: Team['members'];
727
+ };
728
+ type Index = {
729
+ indexVersion: 1;
730
+ source: string;
731
+ commit: string;
732
+ resources: IndexResource[];
733
+ assets?: IndexAsset[];
734
+ };
735
+ type ResolvedGraph = {
736
+ entities: ResolvedEntity[];
737
+ assets: ResolvedAsset[];
738
+ edges: ResolvedEdge[];
739
+ conflicts: Conflict[];
740
+ warnings: ResolutionWarning[];
741
+ externals: External[];
742
+ };
743
+ type ResolvedEntity = IndexResource & {
744
+ resolvedFrom: {
745
+ source: string;
746
+ commit: string;
747
+ };
748
+ contributors?: string[];
749
+ };
750
+ type ResolvedAsset = IndexAsset & {
751
+ resolvedFrom: {
752
+ source: string;
753
+ commit: string;
754
+ };
755
+ contributors?: string[];
756
+ };
757
+ type ResolutionWarning = {
758
+ kind: 'asset-collision';
759
+ path: string;
760
+ sources: string[];
761
+ winner: string;
762
+ };
763
+ type EdgeDirection = 'sends' | 'receives' | 'writesTo' | 'readsFrom' | 'contains' | 'references' | 'appliesTo' | 'relatesTo';
764
+ type ResolvedEdge = {
765
+ from: string;
766
+ fromVersion: string | null;
767
+ fromResolvedFrom: {
768
+ source: string;
769
+ commit: string;
770
+ };
771
+ to: string;
772
+ direction: EdgeDirection;
773
+ via?: string;
774
+ label?: string;
775
+ pointer: string | null;
776
+ resolved: string | null;
777
+ resolvedFrom?: {
778
+ source: string;
779
+ commit: string;
780
+ };
781
+ status: 'resolved' | 'unresolved' | 'external';
782
+ };
783
+ type ConflictKind = 'duplicate-source' | 'type-collision' | 'facet-disagreement' | 'pointer-type-mismatch';
784
+ type Conflict = {
785
+ kind: ConflictKind;
786
+ id: string;
787
+ sources: string[];
788
+ detail?: string;
789
+ };
790
+ type External = {
791
+ id: string;
792
+ version?: string;
793
+ referencedBy: string[];
794
+ didYouMean?: string[];
795
+ };
796
+
661
797
  type SnapshotGitInfo = {
662
798
  branch: string;
663
799
  commit: string;
@@ -1200,6 +1336,351 @@ declare class FlowBuilder<TMessageId extends string = string> {
1200
1336
  private validateNextSteps;
1201
1337
  }
1202
1338
 
1339
+ declare const resolve: (indexes: Index[]) => ResolvedGraph;
1340
+
1341
+ type Fetcher = (request: {
1342
+ source: string;
1343
+ commit: string;
1344
+ path: string;
1345
+ }) => Promise<Buffer>;
1346
+ type Cache = {
1347
+ get(key: string): Promise<Buffer | undefined>;
1348
+ set(key: string, value: Buffer): Promise<void>;
1349
+ };
1350
+ type HydrateOptions = {
1351
+ outDir: string;
1352
+ localSource: string;
1353
+ fetch: Fetcher;
1354
+ modes?: Record<string, 'hydrate' | 'reference'>;
1355
+ cache?: Cache;
1356
+ };
1357
+ type HydrateResult = {
1358
+ fetched: number;
1359
+ written: number;
1360
+ referenced: number;
1361
+ };
1362
+ declare function hydrate(graph: ResolvedGraph, options: HydrateOptions): Promise<HydrateResult>;
1363
+
1364
+ type IndexValidationIssue = {
1365
+ path: (string | number)[];
1366
+ message: string;
1367
+ };
1368
+ declare class InvalidIndexError extends Error {
1369
+ readonly issues: IndexValidationIssue[];
1370
+ constructor(issues: IndexValidationIssue[]);
1371
+ }
1372
+ declare const FederationIndexSchema: z.ZodObject<{
1373
+ indexVersion: z.ZodLiteral<1>;
1374
+ source: z.ZodString;
1375
+ commit: z.ZodString;
1376
+ resources: z.ZodArray<z.ZodObject<{
1377
+ type: z.ZodEnum<{
1378
+ event: "event";
1379
+ command: "command";
1380
+ query: "query";
1381
+ domain: "domain";
1382
+ service: "service";
1383
+ system: "system";
1384
+ agent: "agent";
1385
+ channel: "channel";
1386
+ adr: "adr";
1387
+ "data-product": "data-product";
1388
+ container: "container";
1389
+ entity: "entity";
1390
+ flow: "flow";
1391
+ diagram: "diagram";
1392
+ team: "team";
1393
+ user: "user";
1394
+ }>;
1395
+ id: z.ZodString;
1396
+ version: z.ZodOptional<z.ZodString>;
1397
+ name: z.ZodString;
1398
+ contentPath: z.ZodString;
1399
+ contentHash: z.ZodOptional<z.ZodString>;
1400
+ draft: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
1401
+ title: z.ZodOptional<z.ZodString>;
1402
+ message: z.ZodOptional<z.ZodString>;
1403
+ }, z.core.$strict>]>>;
1404
+ deprecated: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
1405
+ date: z.ZodOptional<z.ZodString>;
1406
+ message: z.ZodOptional<z.ZodString>;
1407
+ }, z.core.$strict>]>>;
1408
+ owners: z.ZodOptional<z.ZodArray<z.ZodString>>;
1409
+ diagrams: z.ZodOptional<z.ZodArray<z.ZodObject<{
1410
+ id: z.ZodString;
1411
+ version: z.ZodOptional<z.ZodString>;
1412
+ type: z.ZodOptional<z.ZodString>;
1413
+ }, z.core.$strict>>>;
1414
+ schemas: z.ZodOptional<z.ZodArray<z.ZodObject<{
1415
+ id: z.ZodOptional<z.ZodString>;
1416
+ ref: z.ZodOptional<z.ZodString>;
1417
+ path: z.ZodOptional<z.ZodString>;
1418
+ name: z.ZodOptional<z.ZodString>;
1419
+ format: z.ZodOptional<z.ZodString>;
1420
+ environments: z.ZodOptional<z.ZodArray<z.ZodString>>;
1421
+ default: z.ZodOptional<z.ZodBoolean>;
1422
+ hash: z.ZodOptional<z.ZodString>;
1423
+ }, z.core.$strict>>>;
1424
+ specifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
1425
+ type: z.ZodEnum<{
1426
+ openapi: "openapi";
1427
+ asyncapi: "asyncapi";
1428
+ graphql: "graphql";
1429
+ }>;
1430
+ path: z.ZodString;
1431
+ name: z.ZodOptional<z.ZodString>;
1432
+ hash: z.ZodOptional<z.ZodString>;
1433
+ }, z.core.$strict>>>;
1434
+ sidecars: z.ZodOptional<z.ZodArray<z.ZodObject<{
1435
+ path: z.ZodString;
1436
+ hash: z.ZodOptional<z.ZodString>;
1437
+ }, z.core.$strict>>>;
1438
+ container_type: z.ZodOptional<z.ZodEnum<{
1439
+ database: "database";
1440
+ cache: "cache";
1441
+ objectStore: "objectStore";
1442
+ searchIndex: "searchIndex";
1443
+ dataWarehouse: "dataWarehouse";
1444
+ dataLake: "dataLake";
1445
+ externalSaaS: "externalSaaS";
1446
+ other: "other";
1447
+ }>>;
1448
+ references: z.ZodOptional<z.ZodArray<z.ZodObject<{
1449
+ id: z.ZodString;
1450
+ version: z.ZodOptional<z.ZodString>;
1451
+ type: z.ZodOptional<z.ZodString>;
1452
+ kind: z.ZodEnum<{
1453
+ service: "service";
1454
+ agent: "agent";
1455
+ message: "message";
1456
+ "data-product": "data-product";
1457
+ container: "container";
1458
+ flow: "flow";
1459
+ }>;
1460
+ }, z.core.$strict>>>;
1461
+ sends: z.ZodOptional<z.ZodArray<z.ZodObject<{
1462
+ id: z.ZodString;
1463
+ version: z.ZodOptional<z.ZodString>;
1464
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
1465
+ to: z.ZodOptional<z.ZodArray<z.ZodObject<{
1466
+ id: z.ZodString;
1467
+ version: z.ZodOptional<z.ZodString>;
1468
+ type: z.ZodOptional<z.ZodString>;
1469
+ label: z.ZodOptional<z.ZodString>;
1470
+ direction: z.ZodOptional<z.ZodEnum<{
1471
+ inbound: "inbound";
1472
+ outbound: "outbound";
1473
+ }>>;
1474
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1475
+ }, z.core.$strict>>>;
1476
+ group: z.ZodOptional<z.ZodString>;
1477
+ }, z.core.$strict>>>;
1478
+ receives: z.ZodOptional<z.ZodArray<z.ZodObject<{
1479
+ id: z.ZodString;
1480
+ version: z.ZodOptional<z.ZodString>;
1481
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
1482
+ from: z.ZodOptional<z.ZodArray<z.ZodObject<{
1483
+ id: z.ZodString;
1484
+ version: z.ZodOptional<z.ZodString>;
1485
+ type: z.ZodOptional<z.ZodString>;
1486
+ label: z.ZodOptional<z.ZodString>;
1487
+ direction: z.ZodOptional<z.ZodEnum<{
1488
+ inbound: "inbound";
1489
+ outbound: "outbound";
1490
+ }>>;
1491
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1492
+ }, z.core.$strict>>>;
1493
+ group: z.ZodOptional<z.ZodString>;
1494
+ triggers: z.ZodOptional<z.ZodArray<z.ZodObject<{
1495
+ id: z.ZodString;
1496
+ version: z.ZodOptional<z.ZodString>;
1497
+ condition: z.ZodOptional<z.ZodString>;
1498
+ }, z.core.$strict>>>;
1499
+ }, z.core.$strict>>>;
1500
+ channels: z.ZodOptional<z.ZodArray<z.ZodObject<{
1501
+ id: z.ZodString;
1502
+ version: z.ZodOptional<z.ZodString>;
1503
+ type: z.ZodOptional<z.ZodString>;
1504
+ label: z.ZodOptional<z.ZodString>;
1505
+ direction: z.ZodOptional<z.ZodEnum<{
1506
+ inbound: "inbound";
1507
+ outbound: "outbound";
1508
+ }>>;
1509
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1510
+ }, z.core.$strict>>>;
1511
+ address: z.ZodOptional<z.ZodString>;
1512
+ protocols: z.ZodOptional<z.ZodArray<z.ZodString>>;
1513
+ deliveryGuarantee: z.ZodOptional<z.ZodEnum<{
1514
+ "at-most-once": "at-most-once";
1515
+ "at-least-once": "at-least-once";
1516
+ "exactly-once": "exactly-once";
1517
+ }>>;
1518
+ routes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1519
+ id: z.ZodString;
1520
+ version: z.ZodOptional<z.ZodString>;
1521
+ type: z.ZodOptional<z.ZodString>;
1522
+ label: z.ZodOptional<z.ZodString>;
1523
+ direction: z.ZodOptional<z.ZodEnum<{
1524
+ inbound: "inbound";
1525
+ outbound: "outbound";
1526
+ }>>;
1527
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1528
+ }, z.core.$strict>>>;
1529
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
1530
+ enum: z.ZodOptional<z.ZodArray<z.ZodString>>;
1531
+ default: z.ZodOptional<z.ZodString>;
1532
+ examples: z.ZodOptional<z.ZodArray<z.ZodString>>;
1533
+ }, z.core.$strict>>>;
1534
+ services: z.ZodOptional<z.ZodArray<z.ZodObject<{
1535
+ id: z.ZodString;
1536
+ version: z.ZodOptional<z.ZodString>;
1537
+ type: z.ZodOptional<z.ZodString>;
1538
+ }, z.core.$strict>>>;
1539
+ agents: z.ZodOptional<z.ZodArray<z.ZodObject<{
1540
+ id: z.ZodString;
1541
+ version: z.ZodOptional<z.ZodString>;
1542
+ type: z.ZodOptional<z.ZodString>;
1543
+ }, z.core.$strict>>>;
1544
+ domains: z.ZodOptional<z.ZodArray<z.ZodObject<{
1545
+ id: z.ZodString;
1546
+ version: z.ZodOptional<z.ZodString>;
1547
+ type: z.ZodOptional<z.ZodString>;
1548
+ }, z.core.$strict>>>;
1549
+ systems: z.ZodOptional<z.ZodArray<z.ZodObject<{
1550
+ id: z.ZodString;
1551
+ version: z.ZodOptional<z.ZodString>;
1552
+ type: z.ZodOptional<z.ZodString>;
1553
+ }, z.core.$strict>>>;
1554
+ entities: z.ZodOptional<z.ZodArray<z.ZodObject<{
1555
+ id: z.ZodString;
1556
+ version: z.ZodOptional<z.ZodString>;
1557
+ type: z.ZodOptional<z.ZodString>;
1558
+ }, z.core.$strict>>>;
1559
+ dataProducts: z.ZodOptional<z.ZodArray<z.ZodObject<{
1560
+ id: z.ZodString;
1561
+ version: z.ZodOptional<z.ZodString>;
1562
+ type: z.ZodOptional<z.ZodString>;
1563
+ }, z.core.$strict>>>;
1564
+ flows: z.ZodOptional<z.ZodArray<z.ZodObject<{
1565
+ id: z.ZodString;
1566
+ version: z.ZodOptional<z.ZodString>;
1567
+ type: z.ZodOptional<z.ZodString>;
1568
+ }, z.core.$strict>>>;
1569
+ writesTo: z.ZodOptional<z.ZodArray<z.ZodObject<{
1570
+ id: z.ZodString;
1571
+ version: z.ZodOptional<z.ZodString>;
1572
+ type: z.ZodOptional<z.ZodString>;
1573
+ }, z.core.$strict>>>;
1574
+ readsFrom: z.ZodOptional<z.ZodArray<z.ZodObject<{
1575
+ id: z.ZodString;
1576
+ version: z.ZodOptional<z.ZodString>;
1577
+ type: z.ZodOptional<z.ZodString>;
1578
+ }, z.core.$strict>>>;
1579
+ containers: z.ZodOptional<z.ZodArray<z.ZodObject<{
1580
+ id: z.ZodString;
1581
+ version: z.ZodOptional<z.ZodString>;
1582
+ type: z.ZodOptional<z.ZodString>;
1583
+ }, z.core.$strict>>>;
1584
+ relationships: z.ZodOptional<z.ZodArray<z.ZodObject<{
1585
+ id: z.ZodString;
1586
+ version: z.ZodOptional<z.ZodString>;
1587
+ label: z.ZodOptional<z.ZodString>;
1588
+ }, z.core.$strict>>>;
1589
+ actors: z.ZodOptional<z.ZodArray<z.ZodObject<{
1590
+ id: z.ZodString;
1591
+ name: z.ZodOptional<z.ZodString>;
1592
+ label: z.ZodOptional<z.ZodString>;
1593
+ direction: z.ZodOptional<z.ZodEnum<{
1594
+ inbound: "inbound";
1595
+ outbound: "outbound";
1596
+ }>>;
1597
+ }, z.core.$strict>>>;
1598
+ inputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1599
+ id: z.ZodString;
1600
+ version: z.ZodOptional<z.ZodString>;
1601
+ type: z.ZodOptional<z.ZodString>;
1602
+ }, z.core.$strict>>>;
1603
+ outputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
1604
+ id: z.ZodString;
1605
+ version: z.ZodOptional<z.ZodString>;
1606
+ contract: z.ZodOptional<z.ZodObject<{
1607
+ path: z.ZodString;
1608
+ name: z.ZodString;
1609
+ type: z.ZodOptional<z.ZodString>;
1610
+ }, z.core.$strict>>;
1611
+ }, z.core.$strict>>>;
1612
+ status: z.ZodOptional<z.ZodEnum<{
1613
+ deprecated: "deprecated";
1614
+ proposed: "proposed";
1615
+ accepted: "accepted";
1616
+ rejected: "rejected";
1617
+ superseded: "superseded";
1618
+ }>>;
1619
+ appliesTo: z.ZodOptional<z.ZodArray<z.ZodObject<{
1620
+ id: z.ZodString;
1621
+ version: z.ZodOptional<z.ZodString>;
1622
+ type: z.ZodEnum<{
1623
+ event: "event";
1624
+ command: "command";
1625
+ query: "query";
1626
+ domain: "domain";
1627
+ service: "service";
1628
+ system: "system";
1629
+ agent: "agent";
1630
+ channel: "channel";
1631
+ "data-product": "data-product";
1632
+ container: "container";
1633
+ entity: "entity";
1634
+ flow: "flow";
1635
+ diagram: "diagram";
1636
+ team: "team";
1637
+ user: "user";
1638
+ }>;
1639
+ }, z.core.$strict>>>;
1640
+ supersedes: z.ZodOptional<z.ZodArray<z.ZodObject<{
1641
+ id: z.ZodString;
1642
+ version: z.ZodOptional<z.ZodString>;
1643
+ }, z.core.$strict>>>;
1644
+ supersededBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
1645
+ id: z.ZodString;
1646
+ version: z.ZodOptional<z.ZodString>;
1647
+ }, z.core.$strict>>>;
1648
+ amends: z.ZodOptional<z.ZodArray<z.ZodObject<{
1649
+ id: z.ZodString;
1650
+ version: z.ZodOptional<z.ZodString>;
1651
+ }, z.core.$strict>>>;
1652
+ amendedBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
1653
+ id: z.ZodString;
1654
+ version: z.ZodOptional<z.ZodString>;
1655
+ }, z.core.$strict>>>;
1656
+ related: z.ZodOptional<z.ZodArray<z.ZodObject<{
1657
+ id: z.ZodString;
1658
+ version: z.ZodOptional<z.ZodString>;
1659
+ }, z.core.$strict>>>;
1660
+ members: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodArray<z.ZodObject<{
1661
+ id: z.ZodString;
1662
+ name: z.ZodString;
1663
+ avatarUrl: z.ZodOptional<z.ZodString>;
1664
+ role: z.ZodOptional<z.ZodString>;
1665
+ hidden: z.ZodOptional<z.ZodBoolean>;
1666
+ source: z.ZodOptional<z.ZodObject<{
1667
+ provider: z.ZodString;
1668
+ id: z.ZodOptional<z.ZodString>;
1669
+ url: z.ZodOptional<z.ZodString>;
1670
+ }, z.core.$strict>>;
1671
+ readOnly: z.ZodOptional<z.ZodBoolean>;
1672
+ email: z.ZodOptional<z.ZodString>;
1673
+ slackDirectMessageUrl: z.ZodOptional<z.ZodString>;
1674
+ markdown: z.ZodString;
1675
+ }, z.core.$loose>>]>>;
1676
+ }, z.core.$strict>>;
1677
+ assets: z.ZodOptional<z.ZodArray<z.ZodObject<{
1678
+ path: z.ZodString;
1679
+ hash: z.ZodOptional<z.ZodString>;
1680
+ }, z.core.$strict>>>;
1681
+ }, z.core.$strict>;
1682
+ declare const parseIndex: (input: unknown) => Index;
1683
+
1203
1684
  /**
1204
1685
  * Init the SDK for EventCatalog
1205
1686
  *
@@ -1558,7 +2039,13 @@ declare const _default: (path: string) => {
1558
2039
  content: string;
1559
2040
  fileName: string;
1560
2041
  }, version?: string, options?: {
1561
- path?: string;
2042
+ path? /**
2043
+ * Adds an command to EventCatalog
2044
+ *
2045
+ * @param command - The command to write
2046
+ * @param options - Optional options to write the command
2047
+ *
2048
+ */: string;
1562
2049
  }) => Promise<void>;
1563
2050
  /**
1564
2051
  * Adds a schema to the given query
@@ -2641,17 +3128,7 @@ declare const _default: (path: string) => {
2641
3128
  id: string;
2642
3129
  version?: string;
2643
3130
  }, options?: {
2644
- path
2645
- /**
2646
- * Returns all events from EventCatalog
2647
- * @param latestOnly - optional boolean, set to true to get only latest versions
2648
- * @returns Event[]|Undefined
2649
- */
2650
- ? /**
2651
- * Returns all events from EventCatalog
2652
- * @param latestOnly - optional boolean, set to true to get only latest versions
2653
- * @returns Event[]|Undefined
2654
- */: string;
3131
+ path?: string;
2655
3132
  format?: "md" | "mdx";
2656
3133
  override?: boolean;
2657
3134
  }) => Promise<void>;
@@ -2699,18 +3176,7 @@ declare const _default: (path: string) => {
2699
3176
  id: string;
2700
3177
  version?: string;
2701
3178
  }, options?: {
2702
- path
2703
- /**
2704
- * Returns a command from EventCatalog
2705
- * @param id - The id of the command to retrieve
2706
- * @param version - Optional id of the version to get (supports semver)
2707
- * @returns Command|Undefined
2708
- */
2709
- ? /**
2710
- * ================================
2711
- * Commands
2712
- * ================================
2713
- */: string;
3179
+ path?: string;
2714
3180
  format?: "md" | "mdx";
2715
3181
  override?: boolean;
2716
3182
  }) => Promise<void>;
@@ -2828,7 +3294,12 @@ declare const _default: (path: string) => {
2828
3294
  }, options?: {
2829
3295
  path?: string;
2830
3296
  format?: "md" | "mdx";
2831
- override?: boolean;
3297
+ override? /**
3298
+ * Remove an event by an Event id
3299
+ *
3300
+ * @param id - The id of the event you want to remove
3301
+ *
3302
+ */: boolean;
2832
3303
  }) => Promise<void>;
2833
3304
  /**
2834
3305
  * Writes a data store to a system by its id
@@ -3048,9 +3519,14 @@ declare const _default: (path: string) => {
3048
3519
  * ```
3049
3520
  */
3050
3521
  createSnapshot: (options?: SnapshotOptions) => Promise<SnapshotResult>;
3522
+ buildIndex: ({ source, commit, hashContent }: {
3523
+ source: string;
3524
+ commit: string;
3525
+ hashContent?: boolean;
3526
+ }) => Promise<Index>;
3051
3527
  diffSnapshots: (snapshotAPath: string, snapshotBPath: string) => Promise<SnapshotDiff>;
3052
3528
  listSnapshots: () => Promise<SnapshotMeta[]>;
3053
3529
  toDSL: (resource: (Event | Command | Query | Service | Domain) | (Event | Command | Query | Service | Domain)[], options: ToDSLOptions) => Promise<string>;
3054
3530
  };
3055
3531
 
3056
- export { type Adr, type AdrPointer, type AdrResourcePointer, type AdrStatus, type Agent, type AgentModel, type AgentTool, type Badge, type BaseSchema, type CatalogGraph, type CatalogGraphNode, type CatalogGraphOptions, type CatalogGraphResource, type CatalogGraphResourceType, type CatalogGraphRoot, type CatalogSnapshot, type Changelog, type Channel, type ChannelPointer, type Command, type Container, type CustomDoc, type DataProduct, type DataProductOutputPointer, type Diagram, type DiffSummary, type Domain, type Entity, type EntityProperty, type Event, type EventCatalog, type ExtensionProperties, type FlatCatalogGraph, type Flow, type FlowActorStepInput, type FlowAgentStepInput, FlowBuilder, type FlowBuilderInput, type FlowCustomStepInput, type FlowDataProductStepInput, type FlowDataStoreStepInput, type FlowExternalSystemStepInput, type FlowMessageStepInput, type FlowServiceStepInput, type FlowStep, type FlowStepInput, type FlowSubFlowStepInput, type GetCatalogGraph, type Message, type MessagePointerInput, type NestedCatalogGraph, type Operation, type Query, type ReceivesPointer, type RelationshipChange, type ResourceChange, type ResourceChangeType, type ResourceGroup, type ResourcePointer, type SchemaPointer, type SendsPointer, type Service, type SnapshotDiff, type SnapshotGitInfo, type SnapshotMeta, type SnapshotOptions, type SnapshotResourceType, type SnapshotResources, type SnapshotResult, type Specification, type Specifications, type System, type SystemActorRelationship, type SystemRelationshipPointer, type SystemScope, type Team, type TriggerPointer, type UbiquitousLanguage, type UbiquitousLanguageDictionary, type User, _default as default };
3532
+ export { type Adr, type AdrPointer, type AdrResourcePointer, type AdrStatus, type Agent, type AgentModel, type AgentTool, type Badge, type BaseSchema, type Cache, type CatalogGraph, type CatalogGraphNode, type CatalogGraphOptions, type CatalogGraphResource, type CatalogGraphResourceType, type CatalogGraphRoot, type CatalogSnapshot, type Changelog, type Channel, type ChannelPointer, type Command, type Conflict, type ConflictKind, type Container, type CustomDoc, type DataProduct, type DataProductOutputPointer, type Diagram, type DiffSummary, type Domain, type EdgeDirection, type Entity, type EntityProperty, type Event, type EventCatalog, type ExtensionProperties, type External, FederationIndexSchema, type Fetcher, type FlatCatalogGraph, type Flow, type FlowActorStepInput, type FlowAgentStepInput, FlowBuilder, type FlowBuilderInput, type FlowCustomStepInput, type FlowDataProductStepInput, type FlowDataStoreStepInput, type FlowExternalSystemStepInput, type FlowMessageStepInput, type FlowServiceStepInput, type FlowStep, type FlowStepInput, type FlowSubFlowStepInput, type GetCatalogGraph, type HydrateOptions, type HydrateResult, type Index, type IndexAsset, type IndexReference, type IndexResource, type IndexResourceType, type IndexSchema, type IndexSidecar, type IndexSpecification, type IndexValidationIssue, InvalidIndexError, type Message, type MessagePointerInput, type NestedCatalogGraph, type Operation, type Query, type ReceivesPointer, type RelationshipChange, type ResolutionWarning, type ResolvedAsset, type ResolvedEdge, type ResolvedEntity, type ResolvedGraph, type ResourceChange, type ResourceChangeType, type ResourceGroup, type ResourcePointer, type SchemaPointer, type SendsPointer, type Service, type SnapshotDiff, type SnapshotGitInfo, type SnapshotMeta, type SnapshotOptions, type SnapshotResourceType, type SnapshotResources, type SnapshotResult, type Specification, type Specifications, type System, type SystemActorRelationship, type SystemRelationshipPointer, type SystemScope, type Team, type TriggerPointer, type UbiquitousLanguage, type UbiquitousLanguageDictionary, type User, _default as default, hydrate, parseIndex, resolve };