@eventcatalog/sdk 2.21.0 → 2.21.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 +94 -22
- package/dist/index.d.ts +94 -22
- package/dist/index.js +87 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +87 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -184,6 +184,7 @@ interface Service extends BaseSchema {
|
|
|
184
184
|
repository?: DetailPanelProperty;
|
|
185
185
|
owners?: DetailPanelProperty;
|
|
186
186
|
changelog?: DetailPanelProperty;
|
|
187
|
+
flows?: DetailPanelProperty;
|
|
187
188
|
};
|
|
188
189
|
}
|
|
189
190
|
|
|
@@ -321,6 +322,7 @@ interface DataProduct extends BaseSchema {
|
|
|
321
322
|
repository?: DetailPanelProperty;
|
|
322
323
|
owners?: DetailPanelProperty;
|
|
323
324
|
changelog?: DetailPanelProperty;
|
|
325
|
+
flows?: DetailPanelProperty;
|
|
324
326
|
};
|
|
325
327
|
}
|
|
326
328
|
|
|
@@ -339,6 +341,8 @@ interface FlowStep {
|
|
|
339
341
|
message?: ResourcePointer;
|
|
340
342
|
service?: ResourcePointer;
|
|
341
343
|
flow?: ResourcePointer;
|
|
344
|
+
container?: ResourcePointer;
|
|
345
|
+
dataProduct?: ResourcePointer;
|
|
342
346
|
actor?: {
|
|
343
347
|
name: string;
|
|
344
348
|
summary?: string;
|
|
@@ -542,6 +546,26 @@ type FlowServiceStepInput = FlowStepInput & {
|
|
|
542
546
|
};
|
|
543
547
|
version?: string;
|
|
544
548
|
};
|
|
549
|
+
/**
|
|
550
|
+
* Payload for a flow step that references a data store/container.
|
|
551
|
+
*/
|
|
552
|
+
type FlowDataStoreStepInput = FlowStepInput & {
|
|
553
|
+
container?: {
|
|
554
|
+
id: string;
|
|
555
|
+
version?: string;
|
|
556
|
+
};
|
|
557
|
+
version?: string;
|
|
558
|
+
};
|
|
559
|
+
/**
|
|
560
|
+
* Payload for a flow step that references a data product.
|
|
561
|
+
*/
|
|
562
|
+
type FlowDataProductStepInput = FlowStepInput & {
|
|
563
|
+
dataProduct?: {
|
|
564
|
+
id: string;
|
|
565
|
+
version?: string;
|
|
566
|
+
};
|
|
567
|
+
version?: string;
|
|
568
|
+
};
|
|
545
569
|
/**
|
|
546
570
|
* Payload for a flow step that represents a user or actor.
|
|
547
571
|
*/
|
|
@@ -756,6 +780,59 @@ declare class FlowBuilder<TMessageId extends string = string> {
|
|
|
756
780
|
* ```
|
|
757
781
|
*/
|
|
758
782
|
addServiceStep(step: FlowServiceStepInput): this;
|
|
783
|
+
/**
|
|
784
|
+
* Add a data store step.
|
|
785
|
+
*
|
|
786
|
+
* Data store steps reference container resources in EventCatalog. If a
|
|
787
|
+
* version is not provided, EventCatalog resolves the latest matching
|
|
788
|
+
* container version when rendering the flow.
|
|
789
|
+
*
|
|
790
|
+
* @param step - The data store step payload.
|
|
791
|
+
*
|
|
792
|
+
* @example
|
|
793
|
+
* ```ts
|
|
794
|
+
* FlowBuilder.create({
|
|
795
|
+
* id: 'OrderFlow',
|
|
796
|
+
* name: 'Order Flow',
|
|
797
|
+
* version: '1.0.0',
|
|
798
|
+
* markdown: '',
|
|
799
|
+
* })
|
|
800
|
+
* .addDataStoreStep({
|
|
801
|
+
* id: 'OrdersDB',
|
|
802
|
+
* container: { id: 'OrdersDB', version: '1.0.0' },
|
|
803
|
+
* });
|
|
804
|
+
* ```
|
|
805
|
+
*/
|
|
806
|
+
addDataStoreStep(step: FlowDataStoreStepInput): this;
|
|
807
|
+
/**
|
|
808
|
+
* Add a container step.
|
|
809
|
+
*
|
|
810
|
+
* Alias for `addDataStoreStep`.
|
|
811
|
+
*/
|
|
812
|
+
addContainerStep(step: FlowDataStoreStepInput): this;
|
|
813
|
+
/**
|
|
814
|
+
* Add a data product step.
|
|
815
|
+
*
|
|
816
|
+
* If a version is not provided, EventCatalog resolves the latest matching
|
|
817
|
+
* data product version when rendering the flow.
|
|
818
|
+
*
|
|
819
|
+
* @param step - The data product step payload.
|
|
820
|
+
*
|
|
821
|
+
* @example
|
|
822
|
+
* ```ts
|
|
823
|
+
* FlowBuilder.create({
|
|
824
|
+
* id: 'OrderFlow',
|
|
825
|
+
* name: 'Order Flow',
|
|
826
|
+
* version: '1.0.0',
|
|
827
|
+
* markdown: '',
|
|
828
|
+
* })
|
|
829
|
+
* .addDataProductStep({
|
|
830
|
+
* id: 'OrderAnalytics',
|
|
831
|
+
* dataProduct: { id: 'OrderAnalytics', version: '1.0.0' },
|
|
832
|
+
* });
|
|
833
|
+
* ```
|
|
834
|
+
*/
|
|
835
|
+
addDataProductStep(step: FlowDataProductStepInput): this;
|
|
759
836
|
/**
|
|
760
837
|
* Add an actor step.
|
|
761
838
|
*
|
|
@@ -1339,7 +1416,14 @@ declare const _default: (path: string) => {
|
|
|
1339
1416
|
path?: string;
|
|
1340
1417
|
override?: boolean;
|
|
1341
1418
|
versionExistingContent?: boolean;
|
|
1342
|
-
format
|
|
1419
|
+
format? /**
|
|
1420
|
+
* Adds an event to a service in EventCatalog
|
|
1421
|
+
*
|
|
1422
|
+
* @param event - The event to write to the service
|
|
1423
|
+
* @param service - The service and it's id to write to the event to
|
|
1424
|
+
* @param options - Optional options to write the event
|
|
1425
|
+
*
|
|
1426
|
+
*/: "md" | "mdx";
|
|
1343
1427
|
}) => Promise<void>;
|
|
1344
1428
|
/**
|
|
1345
1429
|
* Adds a versioned service to EventCatalog
|
|
@@ -1361,7 +1445,12 @@ declare const _default: (path: string) => {
|
|
|
1361
1445
|
version?: string;
|
|
1362
1446
|
direction?: string;
|
|
1363
1447
|
}, options?: {
|
|
1364
|
-
path
|
|
1448
|
+
path? /**
|
|
1449
|
+
* Returns a command from EventCatalog
|
|
1450
|
+
* @param id - The id of the command to retrieve
|
|
1451
|
+
* @param version - Optional id of the version to get (supports semver)
|
|
1452
|
+
* @returns Command|Undefined
|
|
1453
|
+
*/: string;
|
|
1365
1454
|
format?: "md" | "mdx";
|
|
1366
1455
|
override?: boolean;
|
|
1367
1456
|
}) => Promise<void>;
|
|
@@ -1583,19 +1672,7 @@ declare const _default: (path: string) => {
|
|
|
1583
1672
|
*/
|
|
1584
1673
|
writeDomain: (domain: Domain, options?: {
|
|
1585
1674
|
path?: string;
|
|
1586
|
-
override
|
|
1587
|
-
/**
|
|
1588
|
-
* Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1589
|
-
*
|
|
1590
|
-
* @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
|
|
1591
|
-
*
|
|
1592
|
-
*/
|
|
1593
|
-
? /**
|
|
1594
|
-
* Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1595
|
-
*
|
|
1596
|
-
* @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
|
|
1597
|
-
*
|
|
1598
|
-
*/: boolean;
|
|
1675
|
+
override?: boolean;
|
|
1599
1676
|
versionExistingContent?: boolean;
|
|
1600
1677
|
format?: "md" | "mdx";
|
|
1601
1678
|
}) => Promise<void>;
|
|
@@ -2256,12 +2333,7 @@ declare const _default: (path: string) => {
|
|
|
2256
2333
|
}, options?: {
|
|
2257
2334
|
path?: string;
|
|
2258
2335
|
format?: "md" | "mdx";
|
|
2259
|
-
override
|
|
2260
|
-
* Returns a command from EventCatalog
|
|
2261
|
-
* @param id - The id of the command to retrieve
|
|
2262
|
-
* @param version - Optional id of the version to get (supports semver)
|
|
2263
|
-
* @returns Command|Undefined
|
|
2264
|
-
*/: boolean;
|
|
2336
|
+
override?: boolean;
|
|
2265
2337
|
}) => Promise<void>;
|
|
2266
2338
|
/**
|
|
2267
2339
|
* ================================
|
|
@@ -2449,4 +2521,4 @@ declare const _default: (path: string) => {
|
|
|
2449
2521
|
toDSL: (resource: (Event | Command | Query | Service | Domain) | (Event | Command | Query | Service | Domain)[], options: ToDSLOptions) => Promise<string>;
|
|
2450
2522
|
};
|
|
2451
2523
|
|
|
2452
|
-
export { type Badge, type BaseSchema, 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 Event, type EventCatalog, type Flow, type FlowActorStepInput, FlowBuilder, type FlowBuilderInput, type FlowCustomStepInput, type FlowExternalSystemStepInput, type FlowMessageStepInput, type FlowServiceStepInput, type FlowStep, type FlowStepInput, type FlowSubFlowStepInput, type Message, type Operation, type Query, type ReceivesPointer, type RelationshipChange, type ResourceChange, type ResourceChangeType, type ResourceGroup, type ResourcePointer, type SendsPointer, type Service, type SnapshotDiff, type SnapshotGitInfo, type SnapshotMeta, type SnapshotOptions, type SnapshotResourceType, type SnapshotResources, type SnapshotResult, type Specification, type Specifications, type Team, type UbiquitousLanguage, type UbiquitousLanguageDictionary, type User, _default as default };
|
|
2524
|
+
export { type Badge, type BaseSchema, 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 Event, type EventCatalog, type Flow, type FlowActorStepInput, FlowBuilder, type FlowBuilderInput, type FlowCustomStepInput, type FlowDataProductStepInput, type FlowDataStoreStepInput, type FlowExternalSystemStepInput, type FlowMessageStepInput, type FlowServiceStepInput, type FlowStep, type FlowStepInput, type FlowSubFlowStepInput, type Message, type Operation, type Query, type ReceivesPointer, type RelationshipChange, type ResourceChange, type ResourceChangeType, type ResourceGroup, type ResourcePointer, type SendsPointer, type Service, type SnapshotDiff, type SnapshotGitInfo, type SnapshotMeta, type SnapshotOptions, type SnapshotResourceType, type SnapshotResources, type SnapshotResult, type Specification, type Specifications, type Team, type UbiquitousLanguage, type UbiquitousLanguageDictionary, type User, _default as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -184,6 +184,7 @@ interface Service extends BaseSchema {
|
|
|
184
184
|
repository?: DetailPanelProperty;
|
|
185
185
|
owners?: DetailPanelProperty;
|
|
186
186
|
changelog?: DetailPanelProperty;
|
|
187
|
+
flows?: DetailPanelProperty;
|
|
187
188
|
};
|
|
188
189
|
}
|
|
189
190
|
|
|
@@ -321,6 +322,7 @@ interface DataProduct extends BaseSchema {
|
|
|
321
322
|
repository?: DetailPanelProperty;
|
|
322
323
|
owners?: DetailPanelProperty;
|
|
323
324
|
changelog?: DetailPanelProperty;
|
|
325
|
+
flows?: DetailPanelProperty;
|
|
324
326
|
};
|
|
325
327
|
}
|
|
326
328
|
|
|
@@ -339,6 +341,8 @@ interface FlowStep {
|
|
|
339
341
|
message?: ResourcePointer;
|
|
340
342
|
service?: ResourcePointer;
|
|
341
343
|
flow?: ResourcePointer;
|
|
344
|
+
container?: ResourcePointer;
|
|
345
|
+
dataProduct?: ResourcePointer;
|
|
342
346
|
actor?: {
|
|
343
347
|
name: string;
|
|
344
348
|
summary?: string;
|
|
@@ -542,6 +546,26 @@ type FlowServiceStepInput = FlowStepInput & {
|
|
|
542
546
|
};
|
|
543
547
|
version?: string;
|
|
544
548
|
};
|
|
549
|
+
/**
|
|
550
|
+
* Payload for a flow step that references a data store/container.
|
|
551
|
+
*/
|
|
552
|
+
type FlowDataStoreStepInput = FlowStepInput & {
|
|
553
|
+
container?: {
|
|
554
|
+
id: string;
|
|
555
|
+
version?: string;
|
|
556
|
+
};
|
|
557
|
+
version?: string;
|
|
558
|
+
};
|
|
559
|
+
/**
|
|
560
|
+
* Payload for a flow step that references a data product.
|
|
561
|
+
*/
|
|
562
|
+
type FlowDataProductStepInput = FlowStepInput & {
|
|
563
|
+
dataProduct?: {
|
|
564
|
+
id: string;
|
|
565
|
+
version?: string;
|
|
566
|
+
};
|
|
567
|
+
version?: string;
|
|
568
|
+
};
|
|
545
569
|
/**
|
|
546
570
|
* Payload for a flow step that represents a user or actor.
|
|
547
571
|
*/
|
|
@@ -756,6 +780,59 @@ declare class FlowBuilder<TMessageId extends string = string> {
|
|
|
756
780
|
* ```
|
|
757
781
|
*/
|
|
758
782
|
addServiceStep(step: FlowServiceStepInput): this;
|
|
783
|
+
/**
|
|
784
|
+
* Add a data store step.
|
|
785
|
+
*
|
|
786
|
+
* Data store steps reference container resources in EventCatalog. If a
|
|
787
|
+
* version is not provided, EventCatalog resolves the latest matching
|
|
788
|
+
* container version when rendering the flow.
|
|
789
|
+
*
|
|
790
|
+
* @param step - The data store step payload.
|
|
791
|
+
*
|
|
792
|
+
* @example
|
|
793
|
+
* ```ts
|
|
794
|
+
* FlowBuilder.create({
|
|
795
|
+
* id: 'OrderFlow',
|
|
796
|
+
* name: 'Order Flow',
|
|
797
|
+
* version: '1.0.0',
|
|
798
|
+
* markdown: '',
|
|
799
|
+
* })
|
|
800
|
+
* .addDataStoreStep({
|
|
801
|
+
* id: 'OrdersDB',
|
|
802
|
+
* container: { id: 'OrdersDB', version: '1.0.0' },
|
|
803
|
+
* });
|
|
804
|
+
* ```
|
|
805
|
+
*/
|
|
806
|
+
addDataStoreStep(step: FlowDataStoreStepInput): this;
|
|
807
|
+
/**
|
|
808
|
+
* Add a container step.
|
|
809
|
+
*
|
|
810
|
+
* Alias for `addDataStoreStep`.
|
|
811
|
+
*/
|
|
812
|
+
addContainerStep(step: FlowDataStoreStepInput): this;
|
|
813
|
+
/**
|
|
814
|
+
* Add a data product step.
|
|
815
|
+
*
|
|
816
|
+
* If a version is not provided, EventCatalog resolves the latest matching
|
|
817
|
+
* data product version when rendering the flow.
|
|
818
|
+
*
|
|
819
|
+
* @param step - The data product step payload.
|
|
820
|
+
*
|
|
821
|
+
* @example
|
|
822
|
+
* ```ts
|
|
823
|
+
* FlowBuilder.create({
|
|
824
|
+
* id: 'OrderFlow',
|
|
825
|
+
* name: 'Order Flow',
|
|
826
|
+
* version: '1.0.0',
|
|
827
|
+
* markdown: '',
|
|
828
|
+
* })
|
|
829
|
+
* .addDataProductStep({
|
|
830
|
+
* id: 'OrderAnalytics',
|
|
831
|
+
* dataProduct: { id: 'OrderAnalytics', version: '1.0.0' },
|
|
832
|
+
* });
|
|
833
|
+
* ```
|
|
834
|
+
*/
|
|
835
|
+
addDataProductStep(step: FlowDataProductStepInput): this;
|
|
759
836
|
/**
|
|
760
837
|
* Add an actor step.
|
|
761
838
|
*
|
|
@@ -1339,7 +1416,14 @@ declare const _default: (path: string) => {
|
|
|
1339
1416
|
path?: string;
|
|
1340
1417
|
override?: boolean;
|
|
1341
1418
|
versionExistingContent?: boolean;
|
|
1342
|
-
format
|
|
1419
|
+
format? /**
|
|
1420
|
+
* Adds an event to a service in EventCatalog
|
|
1421
|
+
*
|
|
1422
|
+
* @param event - The event to write to the service
|
|
1423
|
+
* @param service - The service and it's id to write to the event to
|
|
1424
|
+
* @param options - Optional options to write the event
|
|
1425
|
+
*
|
|
1426
|
+
*/: "md" | "mdx";
|
|
1343
1427
|
}) => Promise<void>;
|
|
1344
1428
|
/**
|
|
1345
1429
|
* Adds a versioned service to EventCatalog
|
|
@@ -1361,7 +1445,12 @@ declare const _default: (path: string) => {
|
|
|
1361
1445
|
version?: string;
|
|
1362
1446
|
direction?: string;
|
|
1363
1447
|
}, options?: {
|
|
1364
|
-
path
|
|
1448
|
+
path? /**
|
|
1449
|
+
* Returns a command from EventCatalog
|
|
1450
|
+
* @param id - The id of the command to retrieve
|
|
1451
|
+
* @param version - Optional id of the version to get (supports semver)
|
|
1452
|
+
* @returns Command|Undefined
|
|
1453
|
+
*/: string;
|
|
1365
1454
|
format?: "md" | "mdx";
|
|
1366
1455
|
override?: boolean;
|
|
1367
1456
|
}) => Promise<void>;
|
|
@@ -1583,19 +1672,7 @@ declare const _default: (path: string) => {
|
|
|
1583
1672
|
*/
|
|
1584
1673
|
writeDomain: (domain: Domain, options?: {
|
|
1585
1674
|
path?: string;
|
|
1586
|
-
override
|
|
1587
|
-
/**
|
|
1588
|
-
* Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1589
|
-
*
|
|
1590
|
-
* @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
|
|
1591
|
-
*
|
|
1592
|
-
*/
|
|
1593
|
-
? /**
|
|
1594
|
-
* Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1595
|
-
*
|
|
1596
|
-
* @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
|
|
1597
|
-
*
|
|
1598
|
-
*/: boolean;
|
|
1675
|
+
override?: boolean;
|
|
1599
1676
|
versionExistingContent?: boolean;
|
|
1600
1677
|
format?: "md" | "mdx";
|
|
1601
1678
|
}) => Promise<void>;
|
|
@@ -2256,12 +2333,7 @@ declare const _default: (path: string) => {
|
|
|
2256
2333
|
}, options?: {
|
|
2257
2334
|
path?: string;
|
|
2258
2335
|
format?: "md" | "mdx";
|
|
2259
|
-
override
|
|
2260
|
-
* Returns a command from EventCatalog
|
|
2261
|
-
* @param id - The id of the command to retrieve
|
|
2262
|
-
* @param version - Optional id of the version to get (supports semver)
|
|
2263
|
-
* @returns Command|Undefined
|
|
2264
|
-
*/: boolean;
|
|
2336
|
+
override?: boolean;
|
|
2265
2337
|
}) => Promise<void>;
|
|
2266
2338
|
/**
|
|
2267
2339
|
* ================================
|
|
@@ -2449,4 +2521,4 @@ declare const _default: (path: string) => {
|
|
|
2449
2521
|
toDSL: (resource: (Event | Command | Query | Service | Domain) | (Event | Command | Query | Service | Domain)[], options: ToDSLOptions) => Promise<string>;
|
|
2450
2522
|
};
|
|
2451
2523
|
|
|
2452
|
-
export { type Badge, type BaseSchema, 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 Event, type EventCatalog, type Flow, type FlowActorStepInput, FlowBuilder, type FlowBuilderInput, type FlowCustomStepInput, type FlowExternalSystemStepInput, type FlowMessageStepInput, type FlowServiceStepInput, type FlowStep, type FlowStepInput, type FlowSubFlowStepInput, type Message, type Operation, type Query, type ReceivesPointer, type RelationshipChange, type ResourceChange, type ResourceChangeType, type ResourceGroup, type ResourcePointer, type SendsPointer, type Service, type SnapshotDiff, type SnapshotGitInfo, type SnapshotMeta, type SnapshotOptions, type SnapshotResourceType, type SnapshotResources, type SnapshotResult, type Specification, type Specifications, type Team, type UbiquitousLanguage, type UbiquitousLanguageDictionary, type User, _default as default };
|
|
2524
|
+
export { type Badge, type BaseSchema, 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 Event, type EventCatalog, type Flow, type FlowActorStepInput, FlowBuilder, type FlowBuilderInput, type FlowCustomStepInput, type FlowDataProductStepInput, type FlowDataStoreStepInput, type FlowExternalSystemStepInput, type FlowMessageStepInput, type FlowServiceStepInput, type FlowStep, type FlowStepInput, type FlowSubFlowStepInput, type Message, type Operation, type Query, type ReceivesPointer, type RelationshipChange, type ResourceChange, type ResourceChangeType, type ResourceGroup, type ResourcePointer, type SendsPointer, type Service, type SnapshotDiff, type SnapshotGitInfo, type SnapshotMeta, type SnapshotOptions, type SnapshotResourceType, type SnapshotResources, type SnapshotResult, type Specification, type Specifications, type Team, type UbiquitousLanguage, type UbiquitousLanguageDictionary, type User, _default as default };
|
package/dist/index.js
CHANGED
|
@@ -2531,6 +2531,8 @@ var cloneStep = (step) => ({
|
|
|
2531
2531
|
...step.message ? { message: { ...step.message } } : {},
|
|
2532
2532
|
...step.service ? { service: { ...step.service } } : {},
|
|
2533
2533
|
...step.flow ? { flow: { ...step.flow } } : {},
|
|
2534
|
+
...step.container ? { container: { ...step.container } } : {},
|
|
2535
|
+
...step.dataProduct ? { dataProduct: { ...step.dataProduct } } : {},
|
|
2534
2536
|
...step.actor ? { actor: { ...step.actor } } : {},
|
|
2535
2537
|
...step.custom ? {
|
|
2536
2538
|
custom: {
|
|
@@ -2675,6 +2677,91 @@ var FlowBuilder = class _FlowBuilder {
|
|
|
2675
2677
|
step.nextSteps
|
|
2676
2678
|
);
|
|
2677
2679
|
}
|
|
2680
|
+
/**
|
|
2681
|
+
* Add a data store step.
|
|
2682
|
+
*
|
|
2683
|
+
* Data store steps reference container resources in EventCatalog. If a
|
|
2684
|
+
* version is not provided, EventCatalog resolves the latest matching
|
|
2685
|
+
* container version when rendering the flow.
|
|
2686
|
+
*
|
|
2687
|
+
* @param step - The data store step payload.
|
|
2688
|
+
*
|
|
2689
|
+
* @example
|
|
2690
|
+
* ```ts
|
|
2691
|
+
* FlowBuilder.create({
|
|
2692
|
+
* id: 'OrderFlow',
|
|
2693
|
+
* name: 'Order Flow',
|
|
2694
|
+
* version: '1.0.0',
|
|
2695
|
+
* markdown: '',
|
|
2696
|
+
* })
|
|
2697
|
+
* .addDataStoreStep({
|
|
2698
|
+
* id: 'OrdersDB',
|
|
2699
|
+
* container: { id: 'OrdersDB', version: '1.0.0' },
|
|
2700
|
+
* });
|
|
2701
|
+
* ```
|
|
2702
|
+
*/
|
|
2703
|
+
addDataStoreStep(step) {
|
|
2704
|
+
const fallbackContainer = {
|
|
2705
|
+
id: String(step.id),
|
|
2706
|
+
...step.version ? { version: step.version } : {}
|
|
2707
|
+
};
|
|
2708
|
+
const container = step.container ?? fallbackContainer;
|
|
2709
|
+
return this.addStepWithNext(
|
|
2710
|
+
{
|
|
2711
|
+
id: step.id,
|
|
2712
|
+
title: step.title || String(step.id),
|
|
2713
|
+
...step.summary ? { summary: step.summary } : {},
|
|
2714
|
+
container: { ...container, ...step.version && !container.version ? { version: step.version } : {} }
|
|
2715
|
+
},
|
|
2716
|
+
step.nextSteps
|
|
2717
|
+
);
|
|
2718
|
+
}
|
|
2719
|
+
/**
|
|
2720
|
+
* Add a container step.
|
|
2721
|
+
*
|
|
2722
|
+
* Alias for `addDataStoreStep`.
|
|
2723
|
+
*/
|
|
2724
|
+
addContainerStep(step) {
|
|
2725
|
+
return this.addDataStoreStep(step);
|
|
2726
|
+
}
|
|
2727
|
+
/**
|
|
2728
|
+
* Add a data product step.
|
|
2729
|
+
*
|
|
2730
|
+
* If a version is not provided, EventCatalog resolves the latest matching
|
|
2731
|
+
* data product version when rendering the flow.
|
|
2732
|
+
*
|
|
2733
|
+
* @param step - The data product step payload.
|
|
2734
|
+
*
|
|
2735
|
+
* @example
|
|
2736
|
+
* ```ts
|
|
2737
|
+
* FlowBuilder.create({
|
|
2738
|
+
* id: 'OrderFlow',
|
|
2739
|
+
* name: 'Order Flow',
|
|
2740
|
+
* version: '1.0.0',
|
|
2741
|
+
* markdown: '',
|
|
2742
|
+
* })
|
|
2743
|
+
* .addDataProductStep({
|
|
2744
|
+
* id: 'OrderAnalytics',
|
|
2745
|
+
* dataProduct: { id: 'OrderAnalytics', version: '1.0.0' },
|
|
2746
|
+
* });
|
|
2747
|
+
* ```
|
|
2748
|
+
*/
|
|
2749
|
+
addDataProductStep(step) {
|
|
2750
|
+
const fallbackDataProduct = {
|
|
2751
|
+
id: String(step.id),
|
|
2752
|
+
...step.version ? { version: step.version } : {}
|
|
2753
|
+
};
|
|
2754
|
+
const dataProduct = step.dataProduct ?? fallbackDataProduct;
|
|
2755
|
+
return this.addStepWithNext(
|
|
2756
|
+
{
|
|
2757
|
+
id: step.id,
|
|
2758
|
+
title: step.title || String(step.id),
|
|
2759
|
+
...step.summary ? { summary: step.summary } : {},
|
|
2760
|
+
dataProduct: { ...dataProduct, ...step.version && !dataProduct.version ? { version: step.version } : {} }
|
|
2761
|
+
},
|
|
2762
|
+
step.nextSteps
|
|
2763
|
+
);
|
|
2764
|
+
}
|
|
2678
2765
|
/**
|
|
2679
2766
|
* Add an actor step.
|
|
2680
2767
|
*
|