@eventcatalog/sdk 2.21.0 → 2.21.2
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 +95 -22
- package/dist/index.d.ts +95 -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
|
|
|
@@ -245,6 +246,7 @@ interface Badge {
|
|
|
245
246
|
backgroundColor: string;
|
|
246
247
|
textColor: string;
|
|
247
248
|
icon?: string;
|
|
249
|
+
url?: string;
|
|
248
250
|
}
|
|
249
251
|
|
|
250
252
|
interface Changelog {
|
|
@@ -321,6 +323,7 @@ interface DataProduct extends BaseSchema {
|
|
|
321
323
|
repository?: DetailPanelProperty;
|
|
322
324
|
owners?: DetailPanelProperty;
|
|
323
325
|
changelog?: DetailPanelProperty;
|
|
326
|
+
flows?: DetailPanelProperty;
|
|
324
327
|
};
|
|
325
328
|
}
|
|
326
329
|
|
|
@@ -339,6 +342,8 @@ interface FlowStep {
|
|
|
339
342
|
message?: ResourcePointer;
|
|
340
343
|
service?: ResourcePointer;
|
|
341
344
|
flow?: ResourcePointer;
|
|
345
|
+
container?: ResourcePointer;
|
|
346
|
+
dataProduct?: ResourcePointer;
|
|
342
347
|
actor?: {
|
|
343
348
|
name: string;
|
|
344
349
|
summary?: string;
|
|
@@ -542,6 +547,26 @@ type FlowServiceStepInput = FlowStepInput & {
|
|
|
542
547
|
};
|
|
543
548
|
version?: string;
|
|
544
549
|
};
|
|
550
|
+
/**
|
|
551
|
+
* Payload for a flow step that references a data store/container.
|
|
552
|
+
*/
|
|
553
|
+
type FlowDataStoreStepInput = FlowStepInput & {
|
|
554
|
+
container?: {
|
|
555
|
+
id: string;
|
|
556
|
+
version?: string;
|
|
557
|
+
};
|
|
558
|
+
version?: string;
|
|
559
|
+
};
|
|
560
|
+
/**
|
|
561
|
+
* Payload for a flow step that references a data product.
|
|
562
|
+
*/
|
|
563
|
+
type FlowDataProductStepInput = FlowStepInput & {
|
|
564
|
+
dataProduct?: {
|
|
565
|
+
id: string;
|
|
566
|
+
version?: string;
|
|
567
|
+
};
|
|
568
|
+
version?: string;
|
|
569
|
+
};
|
|
545
570
|
/**
|
|
546
571
|
* Payload for a flow step that represents a user or actor.
|
|
547
572
|
*/
|
|
@@ -756,6 +781,59 @@ declare class FlowBuilder<TMessageId extends string = string> {
|
|
|
756
781
|
* ```
|
|
757
782
|
*/
|
|
758
783
|
addServiceStep(step: FlowServiceStepInput): this;
|
|
784
|
+
/**
|
|
785
|
+
* Add a data store step.
|
|
786
|
+
*
|
|
787
|
+
* Data store steps reference container resources in EventCatalog. If a
|
|
788
|
+
* version is not provided, EventCatalog resolves the latest matching
|
|
789
|
+
* container version when rendering the flow.
|
|
790
|
+
*
|
|
791
|
+
* @param step - The data store step payload.
|
|
792
|
+
*
|
|
793
|
+
* @example
|
|
794
|
+
* ```ts
|
|
795
|
+
* FlowBuilder.create({
|
|
796
|
+
* id: 'OrderFlow',
|
|
797
|
+
* name: 'Order Flow',
|
|
798
|
+
* version: '1.0.0',
|
|
799
|
+
* markdown: '',
|
|
800
|
+
* })
|
|
801
|
+
* .addDataStoreStep({
|
|
802
|
+
* id: 'OrdersDB',
|
|
803
|
+
* container: { id: 'OrdersDB', version: '1.0.0' },
|
|
804
|
+
* });
|
|
805
|
+
* ```
|
|
806
|
+
*/
|
|
807
|
+
addDataStoreStep(step: FlowDataStoreStepInput): this;
|
|
808
|
+
/**
|
|
809
|
+
* Add a container step.
|
|
810
|
+
*
|
|
811
|
+
* Alias for `addDataStoreStep`.
|
|
812
|
+
*/
|
|
813
|
+
addContainerStep(step: FlowDataStoreStepInput): this;
|
|
814
|
+
/**
|
|
815
|
+
* Add a data product step.
|
|
816
|
+
*
|
|
817
|
+
* If a version is not provided, EventCatalog resolves the latest matching
|
|
818
|
+
* data product version when rendering the flow.
|
|
819
|
+
*
|
|
820
|
+
* @param step - The data product step payload.
|
|
821
|
+
*
|
|
822
|
+
* @example
|
|
823
|
+
* ```ts
|
|
824
|
+
* FlowBuilder.create({
|
|
825
|
+
* id: 'OrderFlow',
|
|
826
|
+
* name: 'Order Flow',
|
|
827
|
+
* version: '1.0.0',
|
|
828
|
+
* markdown: '',
|
|
829
|
+
* })
|
|
830
|
+
* .addDataProductStep({
|
|
831
|
+
* id: 'OrderAnalytics',
|
|
832
|
+
* dataProduct: { id: 'OrderAnalytics', version: '1.0.0' },
|
|
833
|
+
* });
|
|
834
|
+
* ```
|
|
835
|
+
*/
|
|
836
|
+
addDataProductStep(step: FlowDataProductStepInput): this;
|
|
759
837
|
/**
|
|
760
838
|
* Add an actor step.
|
|
761
839
|
*
|
|
@@ -1339,7 +1417,14 @@ declare const _default: (path: string) => {
|
|
|
1339
1417
|
path?: string;
|
|
1340
1418
|
override?: boolean;
|
|
1341
1419
|
versionExistingContent?: boolean;
|
|
1342
|
-
format
|
|
1420
|
+
format? /**
|
|
1421
|
+
* Adds an event to a service in EventCatalog
|
|
1422
|
+
*
|
|
1423
|
+
* @param event - The event to write to the service
|
|
1424
|
+
* @param service - The service and it's id to write to the event to
|
|
1425
|
+
* @param options - Optional options to write the event
|
|
1426
|
+
*
|
|
1427
|
+
*/: "md" | "mdx";
|
|
1343
1428
|
}) => Promise<void>;
|
|
1344
1429
|
/**
|
|
1345
1430
|
* Adds a versioned service to EventCatalog
|
|
@@ -1361,7 +1446,12 @@ declare const _default: (path: string) => {
|
|
|
1361
1446
|
version?: string;
|
|
1362
1447
|
direction?: string;
|
|
1363
1448
|
}, options?: {
|
|
1364
|
-
path
|
|
1449
|
+
path? /**
|
|
1450
|
+
* Returns a command from EventCatalog
|
|
1451
|
+
* @param id - The id of the command to retrieve
|
|
1452
|
+
* @param version - Optional id of the version to get (supports semver)
|
|
1453
|
+
* @returns Command|Undefined
|
|
1454
|
+
*/: string;
|
|
1365
1455
|
format?: "md" | "mdx";
|
|
1366
1456
|
override?: boolean;
|
|
1367
1457
|
}) => Promise<void>;
|
|
@@ -1583,19 +1673,7 @@ declare const _default: (path: string) => {
|
|
|
1583
1673
|
*/
|
|
1584
1674
|
writeDomain: (domain: Domain, options?: {
|
|
1585
1675
|
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;
|
|
1676
|
+
override?: boolean;
|
|
1599
1677
|
versionExistingContent?: boolean;
|
|
1600
1678
|
format?: "md" | "mdx";
|
|
1601
1679
|
}) => Promise<void>;
|
|
@@ -2256,12 +2334,7 @@ declare const _default: (path: string) => {
|
|
|
2256
2334
|
}, options?: {
|
|
2257
2335
|
path?: string;
|
|
2258
2336
|
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;
|
|
2337
|
+
override?: boolean;
|
|
2265
2338
|
}) => Promise<void>;
|
|
2266
2339
|
/**
|
|
2267
2340
|
* ================================
|
|
@@ -2449,4 +2522,4 @@ declare const _default: (path: string) => {
|
|
|
2449
2522
|
toDSL: (resource: (Event | Command | Query | Service | Domain) | (Event | Command | Query | Service | Domain)[], options: ToDSLOptions) => Promise<string>;
|
|
2450
2523
|
};
|
|
2451
2524
|
|
|
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 };
|
|
2525
|
+
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
|
|
|
@@ -245,6 +246,7 @@ interface Badge {
|
|
|
245
246
|
backgroundColor: string;
|
|
246
247
|
textColor: string;
|
|
247
248
|
icon?: string;
|
|
249
|
+
url?: string;
|
|
248
250
|
}
|
|
249
251
|
|
|
250
252
|
interface Changelog {
|
|
@@ -321,6 +323,7 @@ interface DataProduct extends BaseSchema {
|
|
|
321
323
|
repository?: DetailPanelProperty;
|
|
322
324
|
owners?: DetailPanelProperty;
|
|
323
325
|
changelog?: DetailPanelProperty;
|
|
326
|
+
flows?: DetailPanelProperty;
|
|
324
327
|
};
|
|
325
328
|
}
|
|
326
329
|
|
|
@@ -339,6 +342,8 @@ interface FlowStep {
|
|
|
339
342
|
message?: ResourcePointer;
|
|
340
343
|
service?: ResourcePointer;
|
|
341
344
|
flow?: ResourcePointer;
|
|
345
|
+
container?: ResourcePointer;
|
|
346
|
+
dataProduct?: ResourcePointer;
|
|
342
347
|
actor?: {
|
|
343
348
|
name: string;
|
|
344
349
|
summary?: string;
|
|
@@ -542,6 +547,26 @@ type FlowServiceStepInput = FlowStepInput & {
|
|
|
542
547
|
};
|
|
543
548
|
version?: string;
|
|
544
549
|
};
|
|
550
|
+
/**
|
|
551
|
+
* Payload for a flow step that references a data store/container.
|
|
552
|
+
*/
|
|
553
|
+
type FlowDataStoreStepInput = FlowStepInput & {
|
|
554
|
+
container?: {
|
|
555
|
+
id: string;
|
|
556
|
+
version?: string;
|
|
557
|
+
};
|
|
558
|
+
version?: string;
|
|
559
|
+
};
|
|
560
|
+
/**
|
|
561
|
+
* Payload for a flow step that references a data product.
|
|
562
|
+
*/
|
|
563
|
+
type FlowDataProductStepInput = FlowStepInput & {
|
|
564
|
+
dataProduct?: {
|
|
565
|
+
id: string;
|
|
566
|
+
version?: string;
|
|
567
|
+
};
|
|
568
|
+
version?: string;
|
|
569
|
+
};
|
|
545
570
|
/**
|
|
546
571
|
* Payload for a flow step that represents a user or actor.
|
|
547
572
|
*/
|
|
@@ -756,6 +781,59 @@ declare class FlowBuilder<TMessageId extends string = string> {
|
|
|
756
781
|
* ```
|
|
757
782
|
*/
|
|
758
783
|
addServiceStep(step: FlowServiceStepInput): this;
|
|
784
|
+
/**
|
|
785
|
+
* Add a data store step.
|
|
786
|
+
*
|
|
787
|
+
* Data store steps reference container resources in EventCatalog. If a
|
|
788
|
+
* version is not provided, EventCatalog resolves the latest matching
|
|
789
|
+
* container version when rendering the flow.
|
|
790
|
+
*
|
|
791
|
+
* @param step - The data store step payload.
|
|
792
|
+
*
|
|
793
|
+
* @example
|
|
794
|
+
* ```ts
|
|
795
|
+
* FlowBuilder.create({
|
|
796
|
+
* id: 'OrderFlow',
|
|
797
|
+
* name: 'Order Flow',
|
|
798
|
+
* version: '1.0.0',
|
|
799
|
+
* markdown: '',
|
|
800
|
+
* })
|
|
801
|
+
* .addDataStoreStep({
|
|
802
|
+
* id: 'OrdersDB',
|
|
803
|
+
* container: { id: 'OrdersDB', version: '1.0.0' },
|
|
804
|
+
* });
|
|
805
|
+
* ```
|
|
806
|
+
*/
|
|
807
|
+
addDataStoreStep(step: FlowDataStoreStepInput): this;
|
|
808
|
+
/**
|
|
809
|
+
* Add a container step.
|
|
810
|
+
*
|
|
811
|
+
* Alias for `addDataStoreStep`.
|
|
812
|
+
*/
|
|
813
|
+
addContainerStep(step: FlowDataStoreStepInput): this;
|
|
814
|
+
/**
|
|
815
|
+
* Add a data product step.
|
|
816
|
+
*
|
|
817
|
+
* If a version is not provided, EventCatalog resolves the latest matching
|
|
818
|
+
* data product version when rendering the flow.
|
|
819
|
+
*
|
|
820
|
+
* @param step - The data product step payload.
|
|
821
|
+
*
|
|
822
|
+
* @example
|
|
823
|
+
* ```ts
|
|
824
|
+
* FlowBuilder.create({
|
|
825
|
+
* id: 'OrderFlow',
|
|
826
|
+
* name: 'Order Flow',
|
|
827
|
+
* version: '1.0.0',
|
|
828
|
+
* markdown: '',
|
|
829
|
+
* })
|
|
830
|
+
* .addDataProductStep({
|
|
831
|
+
* id: 'OrderAnalytics',
|
|
832
|
+
* dataProduct: { id: 'OrderAnalytics', version: '1.0.0' },
|
|
833
|
+
* });
|
|
834
|
+
* ```
|
|
835
|
+
*/
|
|
836
|
+
addDataProductStep(step: FlowDataProductStepInput): this;
|
|
759
837
|
/**
|
|
760
838
|
* Add an actor step.
|
|
761
839
|
*
|
|
@@ -1339,7 +1417,14 @@ declare const _default: (path: string) => {
|
|
|
1339
1417
|
path?: string;
|
|
1340
1418
|
override?: boolean;
|
|
1341
1419
|
versionExistingContent?: boolean;
|
|
1342
|
-
format
|
|
1420
|
+
format? /**
|
|
1421
|
+
* Adds an event to a service in EventCatalog
|
|
1422
|
+
*
|
|
1423
|
+
* @param event - The event to write to the service
|
|
1424
|
+
* @param service - The service and it's id to write to the event to
|
|
1425
|
+
* @param options - Optional options to write the event
|
|
1426
|
+
*
|
|
1427
|
+
*/: "md" | "mdx";
|
|
1343
1428
|
}) => Promise<void>;
|
|
1344
1429
|
/**
|
|
1345
1430
|
* Adds a versioned service to EventCatalog
|
|
@@ -1361,7 +1446,12 @@ declare const _default: (path: string) => {
|
|
|
1361
1446
|
version?: string;
|
|
1362
1447
|
direction?: string;
|
|
1363
1448
|
}, options?: {
|
|
1364
|
-
path
|
|
1449
|
+
path? /**
|
|
1450
|
+
* Returns a command from EventCatalog
|
|
1451
|
+
* @param id - The id of the command to retrieve
|
|
1452
|
+
* @param version - Optional id of the version to get (supports semver)
|
|
1453
|
+
* @returns Command|Undefined
|
|
1454
|
+
*/: string;
|
|
1365
1455
|
format?: "md" | "mdx";
|
|
1366
1456
|
override?: boolean;
|
|
1367
1457
|
}) => Promise<void>;
|
|
@@ -1583,19 +1673,7 @@ declare const _default: (path: string) => {
|
|
|
1583
1673
|
*/
|
|
1584
1674
|
writeDomain: (domain: Domain, options?: {
|
|
1585
1675
|
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;
|
|
1676
|
+
override?: boolean;
|
|
1599
1677
|
versionExistingContent?: boolean;
|
|
1600
1678
|
format?: "md" | "mdx";
|
|
1601
1679
|
}) => Promise<void>;
|
|
@@ -2256,12 +2334,7 @@ declare const _default: (path: string) => {
|
|
|
2256
2334
|
}, options?: {
|
|
2257
2335
|
path?: string;
|
|
2258
2336
|
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;
|
|
2337
|
+
override?: boolean;
|
|
2265
2338
|
}) => Promise<void>;
|
|
2266
2339
|
/**
|
|
2267
2340
|
* ================================
|
|
@@ -2449,4 +2522,4 @@ declare const _default: (path: string) => {
|
|
|
2449
2522
|
toDSL: (resource: (Event | Command | Query | Service | Domain) | (Event | Command | Query | Service | Domain)[], options: ToDSLOptions) => Promise<string>;
|
|
2450
2523
|
};
|
|
2451
2524
|
|
|
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 };
|
|
2525
|
+
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
|
*
|