@eventcatalog/sdk 2.25.0 → 2.26.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 +36 -60
- package/dist/index.d.ts +36 -60
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
interface ExtensionProperties {
|
|
2
|
+
[key: `x-${string}`]: unknown;
|
|
3
|
+
}
|
|
4
|
+
|
|
1
5
|
// Base type for all resources (domains, services and messages)
|
|
2
|
-
interface BaseSchema {
|
|
6
|
+
interface BaseSchema extends ExtensionProperties {
|
|
3
7
|
id: string;
|
|
4
8
|
name: string;
|
|
5
9
|
summary?: string;
|
|
@@ -86,12 +90,27 @@ type SendsPointer = {
|
|
|
86
90
|
group?: string;
|
|
87
91
|
};
|
|
88
92
|
|
|
93
|
+
type TriggerPointer = {
|
|
94
|
+
id: string;
|
|
95
|
+
version?: string;
|
|
96
|
+
condition?: string;
|
|
97
|
+
};
|
|
98
|
+
|
|
89
99
|
type ReceivesPointer = {
|
|
90
100
|
id: string;
|
|
91
101
|
version?: string;
|
|
92
102
|
fields?: string[];
|
|
93
103
|
from?: ChannelPointer[];
|
|
94
104
|
group?: string;
|
|
105
|
+
triggers?: TriggerPointer[];
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
type MessagePointerInput = {
|
|
109
|
+
id: string;
|
|
110
|
+
version: string;
|
|
111
|
+
fields?: string[];
|
|
112
|
+
group?: string;
|
|
113
|
+
triggers?: TriggerPointer[];
|
|
95
114
|
};
|
|
96
115
|
|
|
97
116
|
interface ResourceGroup {
|
|
@@ -131,6 +150,8 @@ interface CustomDoc {
|
|
|
131
150
|
interface MessageDetailsPanelProperty {
|
|
132
151
|
producers?: DetailPanelProperty;
|
|
133
152
|
consumers?: DetailPanelProperty;
|
|
153
|
+
triggers?: DetailPanelProperty;
|
|
154
|
+
triggeredBy?: DetailPanelProperty;
|
|
134
155
|
channels?: DetailPanelProperty;
|
|
135
156
|
versions?: DetailPanelProperty;
|
|
136
157
|
repository?: DetailPanelProperty;
|
|
@@ -1790,12 +1811,7 @@ declare const _default: (path: string) => {
|
|
|
1790
1811
|
*
|
|
1791
1812
|
* ```
|
|
1792
1813
|
*/
|
|
1793
|
-
addEventToService: (id: string, direction: string, event:
|
|
1794
|
-
id: string;
|
|
1795
|
-
version: string;
|
|
1796
|
-
fields?: string[];
|
|
1797
|
-
group?: string;
|
|
1798
|
-
}, version?: string) => Promise<void>;
|
|
1814
|
+
addEventToService: (id: string, direction: string, event: MessagePointerInput, version?: string) => Promise<void>;
|
|
1799
1815
|
/**
|
|
1800
1816
|
* Add a data store to a service by it's id.
|
|
1801
1817
|
*
|
|
@@ -1835,12 +1851,7 @@ declare const _default: (path: string) => {
|
|
|
1835
1851
|
*
|
|
1836
1852
|
* ```
|
|
1837
1853
|
*/
|
|
1838
|
-
addCommandToService: (id: string, direction: string, event:
|
|
1839
|
-
id: string;
|
|
1840
|
-
version: string;
|
|
1841
|
-
fields?: string[];
|
|
1842
|
-
group?: string;
|
|
1843
|
-
}, version?: string) => Promise<void>;
|
|
1854
|
+
addCommandToService: (id: string, direction: string, event: MessagePointerInput, version?: string) => Promise<void>;
|
|
1844
1855
|
/**
|
|
1845
1856
|
* Add a query to a service by it's id.
|
|
1846
1857
|
*
|
|
@@ -1860,12 +1871,7 @@ declare const _default: (path: string) => {
|
|
|
1860
1871
|
*
|
|
1861
1872
|
* ```
|
|
1862
1873
|
*/
|
|
1863
|
-
addQueryToService: (id: string, direction: string, event:
|
|
1864
|
-
id: string;
|
|
1865
|
-
version: string;
|
|
1866
|
-
fields?: string[];
|
|
1867
|
-
group?: string;
|
|
1868
|
-
}, version?: string) => Promise<void>;
|
|
1874
|
+
addQueryToService: (id: string, direction: string, event: MessagePointerInput, version?: string) => Promise<void>;
|
|
1869
1875
|
/**
|
|
1870
1876
|
* Add an entity to a service by its id.
|
|
1871
1877
|
*
|
|
@@ -1992,24 +1998,9 @@ declare const _default: (path: string) => {
|
|
|
1992
1998
|
content: string;
|
|
1993
1999
|
fileName: string;
|
|
1994
2000
|
}, version?: string) => Promise<void>;
|
|
1995
|
-
addEventToAgent: (id: string, direction: string, message:
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
fields?: string[];
|
|
1999
|
-
group?: string;
|
|
2000
|
-
}, version?: string) => Promise<void>;
|
|
2001
|
-
addCommandToAgent: (id: string, direction: string, message: {
|
|
2002
|
-
id: string;
|
|
2003
|
-
version: string;
|
|
2004
|
-
fields?: string[];
|
|
2005
|
-
group?: string;
|
|
2006
|
-
}, version?: string) => Promise<void>;
|
|
2007
|
-
addQueryToAgent: (id: string, direction: string, message: {
|
|
2008
|
-
id: string;
|
|
2009
|
-
version: string;
|
|
2010
|
-
fields?: string[];
|
|
2011
|
-
group?: string;
|
|
2012
|
-
}, version?: string) => Promise<void>;
|
|
2001
|
+
addEventToAgent: (id: string, direction: string, message: MessagePointerInput, version?: string) => Promise<void>;
|
|
2002
|
+
addCommandToAgent: (id: string, direction: string, message: MessagePointerInput, version?: string) => Promise<void>;
|
|
2003
|
+
addQueryToAgent: (id: string, direction: string, message: MessagePointerInput, version?: string) => Promise<void>;
|
|
2013
2004
|
addDataStoreToAgent: (id: string, direction: string, dataStore: {
|
|
2014
2005
|
id: string;
|
|
2015
2006
|
version: string;
|
|
@@ -2179,12 +2170,7 @@ declare const _default: (path: string) => {
|
|
|
2179
2170
|
*
|
|
2180
2171
|
* ```
|
|
2181
2172
|
*/
|
|
2182
|
-
addEventToDomain: (id: string, direction: string, message:
|
|
2183
|
-
id: string;
|
|
2184
|
-
version: string;
|
|
2185
|
-
fields?: string[];
|
|
2186
|
-
group?: string;
|
|
2187
|
-
}, version?: string) => Promise<void>;
|
|
2173
|
+
addEventToDomain: (id: string, direction: string, message: MessagePointerInput, version?: string) => Promise<void>;
|
|
2188
2174
|
/**
|
|
2189
2175
|
* Add a command to a domain by its id.
|
|
2190
2176
|
*
|
|
@@ -2202,12 +2188,7 @@ declare const _default: (path: string) => {
|
|
|
2202
2188
|
*
|
|
2203
2189
|
* ```
|
|
2204
2190
|
*/
|
|
2205
|
-
addCommandToDomain: (id: string, direction: string, message:
|
|
2206
|
-
id: string;
|
|
2207
|
-
version: string;
|
|
2208
|
-
fields?: string[];
|
|
2209
|
-
group?: string;
|
|
2210
|
-
}, version?: string) => Promise<void>;
|
|
2191
|
+
addCommandToDomain: (id: string, direction: string, message: MessagePointerInput, version?: string) => Promise<void>;
|
|
2211
2192
|
/**
|
|
2212
2193
|
* Add a query to a domain by its id.
|
|
2213
2194
|
*
|
|
@@ -2225,12 +2206,7 @@ declare const _default: (path: string) => {
|
|
|
2225
2206
|
*
|
|
2226
2207
|
* ```
|
|
2227
2208
|
*/
|
|
2228
|
-
addQueryToDomain: (id: string, direction: string, message:
|
|
2229
|
-
id: string;
|
|
2230
|
-
version: string;
|
|
2231
|
-
fields?: string[];
|
|
2232
|
-
group?: string;
|
|
2233
|
-
}, version?: string) => Promise<void>;
|
|
2209
|
+
addQueryToDomain: (id: string, direction: string, message: MessagePointerInput, version?: string) => Promise<void>;
|
|
2234
2210
|
/**
|
|
2235
2211
|
* ================================
|
|
2236
2212
|
* Teams
|
|
@@ -2447,21 +2423,21 @@ declare const _default: (path: string) => {
|
|
|
2447
2423
|
getProducersAndConsumersForMessage: (id: string, version?: string, options?: {
|
|
2448
2424
|
latestOnly?: boolean;
|
|
2449
2425
|
}) => Promise<{
|
|
2450
|
-
producers: (Service | Agent)[];
|
|
2451
|
-
consumers: (Service | Agent)[];
|
|
2426
|
+
producers: (Service | Agent | Domain)[];
|
|
2427
|
+
consumers: (Service | Agent | Domain)[];
|
|
2452
2428
|
}>;
|
|
2453
2429
|
/**
|
|
2454
2430
|
* Returns the consumers of a given schema path
|
|
2455
2431
|
* @param path - The path to the schema to get the consumers for
|
|
2456
2432
|
* @returns (Service|Agent)[]
|
|
2457
2433
|
*/
|
|
2458
|
-
getConsumersOfSchema: (path: string) => Promise<(Service | Agent)[]>;
|
|
2434
|
+
getConsumersOfSchema: (path: string) => Promise<(Service | Agent | Domain)[]>;
|
|
2459
2435
|
/**
|
|
2460
2436
|
* Returns the producers of a given schema path
|
|
2461
2437
|
* @param path - The path to the schema to get the producers for
|
|
2462
2438
|
* @returns (Service|Agent)[]
|
|
2463
2439
|
*/
|
|
2464
|
-
getProducersOfSchema: (path: string) => Promise<(Service | Agent)[]>;
|
|
2440
|
+
getProducersOfSchema: (path: string) => Promise<(Service | Agent | Domain)[]>;
|
|
2465
2441
|
/**
|
|
2466
2442
|
* Returns the schema for a given message (event, command or query) by its id and version.
|
|
2467
2443
|
* If no version is given, the latest version is used.
|
|
@@ -3010,4 +2986,4 @@ declare const _default: (path: string) => {
|
|
|
3010
2986
|
toDSL: (resource: (Event | Command | Query | Service | Domain) | (Event | Command | Query | Service | Domain)[], options: ToDSLOptions) => Promise<string>;
|
|
3011
2987
|
};
|
|
3012
2988
|
|
|
3013
|
-
export { type Adr, type AdrPointer, type AdrResourcePointer, type AdrStatus, type Agent, type AgentModel, type AgentTool, 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, type FlowAgentStepInput, 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 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 UbiquitousLanguage, type UbiquitousLanguageDictionary, type User, _default as default };
|
|
2989
|
+
export { type Adr, type AdrPointer, type AdrResourcePointer, type AdrStatus, type Agent, type AgentModel, type AgentTool, 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 ExtensionProperties, 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 Message, type MessagePointerInput, 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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
interface ExtensionProperties {
|
|
2
|
+
[key: `x-${string}`]: unknown;
|
|
3
|
+
}
|
|
4
|
+
|
|
1
5
|
// Base type for all resources (domains, services and messages)
|
|
2
|
-
interface BaseSchema {
|
|
6
|
+
interface BaseSchema extends ExtensionProperties {
|
|
3
7
|
id: string;
|
|
4
8
|
name: string;
|
|
5
9
|
summary?: string;
|
|
@@ -86,12 +90,27 @@ type SendsPointer = {
|
|
|
86
90
|
group?: string;
|
|
87
91
|
};
|
|
88
92
|
|
|
93
|
+
type TriggerPointer = {
|
|
94
|
+
id: string;
|
|
95
|
+
version?: string;
|
|
96
|
+
condition?: string;
|
|
97
|
+
};
|
|
98
|
+
|
|
89
99
|
type ReceivesPointer = {
|
|
90
100
|
id: string;
|
|
91
101
|
version?: string;
|
|
92
102
|
fields?: string[];
|
|
93
103
|
from?: ChannelPointer[];
|
|
94
104
|
group?: string;
|
|
105
|
+
triggers?: TriggerPointer[];
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
type MessagePointerInput = {
|
|
109
|
+
id: string;
|
|
110
|
+
version: string;
|
|
111
|
+
fields?: string[];
|
|
112
|
+
group?: string;
|
|
113
|
+
triggers?: TriggerPointer[];
|
|
95
114
|
};
|
|
96
115
|
|
|
97
116
|
interface ResourceGroup {
|
|
@@ -131,6 +150,8 @@ interface CustomDoc {
|
|
|
131
150
|
interface MessageDetailsPanelProperty {
|
|
132
151
|
producers?: DetailPanelProperty;
|
|
133
152
|
consumers?: DetailPanelProperty;
|
|
153
|
+
triggers?: DetailPanelProperty;
|
|
154
|
+
triggeredBy?: DetailPanelProperty;
|
|
134
155
|
channels?: DetailPanelProperty;
|
|
135
156
|
versions?: DetailPanelProperty;
|
|
136
157
|
repository?: DetailPanelProperty;
|
|
@@ -1790,12 +1811,7 @@ declare const _default: (path: string) => {
|
|
|
1790
1811
|
*
|
|
1791
1812
|
* ```
|
|
1792
1813
|
*/
|
|
1793
|
-
addEventToService: (id: string, direction: string, event:
|
|
1794
|
-
id: string;
|
|
1795
|
-
version: string;
|
|
1796
|
-
fields?: string[];
|
|
1797
|
-
group?: string;
|
|
1798
|
-
}, version?: string) => Promise<void>;
|
|
1814
|
+
addEventToService: (id: string, direction: string, event: MessagePointerInput, version?: string) => Promise<void>;
|
|
1799
1815
|
/**
|
|
1800
1816
|
* Add a data store to a service by it's id.
|
|
1801
1817
|
*
|
|
@@ -1835,12 +1851,7 @@ declare const _default: (path: string) => {
|
|
|
1835
1851
|
*
|
|
1836
1852
|
* ```
|
|
1837
1853
|
*/
|
|
1838
|
-
addCommandToService: (id: string, direction: string, event:
|
|
1839
|
-
id: string;
|
|
1840
|
-
version: string;
|
|
1841
|
-
fields?: string[];
|
|
1842
|
-
group?: string;
|
|
1843
|
-
}, version?: string) => Promise<void>;
|
|
1854
|
+
addCommandToService: (id: string, direction: string, event: MessagePointerInput, version?: string) => Promise<void>;
|
|
1844
1855
|
/**
|
|
1845
1856
|
* Add a query to a service by it's id.
|
|
1846
1857
|
*
|
|
@@ -1860,12 +1871,7 @@ declare const _default: (path: string) => {
|
|
|
1860
1871
|
*
|
|
1861
1872
|
* ```
|
|
1862
1873
|
*/
|
|
1863
|
-
addQueryToService: (id: string, direction: string, event:
|
|
1864
|
-
id: string;
|
|
1865
|
-
version: string;
|
|
1866
|
-
fields?: string[];
|
|
1867
|
-
group?: string;
|
|
1868
|
-
}, version?: string) => Promise<void>;
|
|
1874
|
+
addQueryToService: (id: string, direction: string, event: MessagePointerInput, version?: string) => Promise<void>;
|
|
1869
1875
|
/**
|
|
1870
1876
|
* Add an entity to a service by its id.
|
|
1871
1877
|
*
|
|
@@ -1992,24 +1998,9 @@ declare const _default: (path: string) => {
|
|
|
1992
1998
|
content: string;
|
|
1993
1999
|
fileName: string;
|
|
1994
2000
|
}, version?: string) => Promise<void>;
|
|
1995
|
-
addEventToAgent: (id: string, direction: string, message:
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
fields?: string[];
|
|
1999
|
-
group?: string;
|
|
2000
|
-
}, version?: string) => Promise<void>;
|
|
2001
|
-
addCommandToAgent: (id: string, direction: string, message: {
|
|
2002
|
-
id: string;
|
|
2003
|
-
version: string;
|
|
2004
|
-
fields?: string[];
|
|
2005
|
-
group?: string;
|
|
2006
|
-
}, version?: string) => Promise<void>;
|
|
2007
|
-
addQueryToAgent: (id: string, direction: string, message: {
|
|
2008
|
-
id: string;
|
|
2009
|
-
version: string;
|
|
2010
|
-
fields?: string[];
|
|
2011
|
-
group?: string;
|
|
2012
|
-
}, version?: string) => Promise<void>;
|
|
2001
|
+
addEventToAgent: (id: string, direction: string, message: MessagePointerInput, version?: string) => Promise<void>;
|
|
2002
|
+
addCommandToAgent: (id: string, direction: string, message: MessagePointerInput, version?: string) => Promise<void>;
|
|
2003
|
+
addQueryToAgent: (id: string, direction: string, message: MessagePointerInput, version?: string) => Promise<void>;
|
|
2013
2004
|
addDataStoreToAgent: (id: string, direction: string, dataStore: {
|
|
2014
2005
|
id: string;
|
|
2015
2006
|
version: string;
|
|
@@ -2179,12 +2170,7 @@ declare const _default: (path: string) => {
|
|
|
2179
2170
|
*
|
|
2180
2171
|
* ```
|
|
2181
2172
|
*/
|
|
2182
|
-
addEventToDomain: (id: string, direction: string, message:
|
|
2183
|
-
id: string;
|
|
2184
|
-
version: string;
|
|
2185
|
-
fields?: string[];
|
|
2186
|
-
group?: string;
|
|
2187
|
-
}, version?: string) => Promise<void>;
|
|
2173
|
+
addEventToDomain: (id: string, direction: string, message: MessagePointerInput, version?: string) => Promise<void>;
|
|
2188
2174
|
/**
|
|
2189
2175
|
* Add a command to a domain by its id.
|
|
2190
2176
|
*
|
|
@@ -2202,12 +2188,7 @@ declare const _default: (path: string) => {
|
|
|
2202
2188
|
*
|
|
2203
2189
|
* ```
|
|
2204
2190
|
*/
|
|
2205
|
-
addCommandToDomain: (id: string, direction: string, message:
|
|
2206
|
-
id: string;
|
|
2207
|
-
version: string;
|
|
2208
|
-
fields?: string[];
|
|
2209
|
-
group?: string;
|
|
2210
|
-
}, version?: string) => Promise<void>;
|
|
2191
|
+
addCommandToDomain: (id: string, direction: string, message: MessagePointerInput, version?: string) => Promise<void>;
|
|
2211
2192
|
/**
|
|
2212
2193
|
* Add a query to a domain by its id.
|
|
2213
2194
|
*
|
|
@@ -2225,12 +2206,7 @@ declare const _default: (path: string) => {
|
|
|
2225
2206
|
*
|
|
2226
2207
|
* ```
|
|
2227
2208
|
*/
|
|
2228
|
-
addQueryToDomain: (id: string, direction: string, message:
|
|
2229
|
-
id: string;
|
|
2230
|
-
version: string;
|
|
2231
|
-
fields?: string[];
|
|
2232
|
-
group?: string;
|
|
2233
|
-
}, version?: string) => Promise<void>;
|
|
2209
|
+
addQueryToDomain: (id: string, direction: string, message: MessagePointerInput, version?: string) => Promise<void>;
|
|
2234
2210
|
/**
|
|
2235
2211
|
* ================================
|
|
2236
2212
|
* Teams
|
|
@@ -2447,21 +2423,21 @@ declare const _default: (path: string) => {
|
|
|
2447
2423
|
getProducersAndConsumersForMessage: (id: string, version?: string, options?: {
|
|
2448
2424
|
latestOnly?: boolean;
|
|
2449
2425
|
}) => Promise<{
|
|
2450
|
-
producers: (Service | Agent)[];
|
|
2451
|
-
consumers: (Service | Agent)[];
|
|
2426
|
+
producers: (Service | Agent | Domain)[];
|
|
2427
|
+
consumers: (Service | Agent | Domain)[];
|
|
2452
2428
|
}>;
|
|
2453
2429
|
/**
|
|
2454
2430
|
* Returns the consumers of a given schema path
|
|
2455
2431
|
* @param path - The path to the schema to get the consumers for
|
|
2456
2432
|
* @returns (Service|Agent)[]
|
|
2457
2433
|
*/
|
|
2458
|
-
getConsumersOfSchema: (path: string) => Promise<(Service | Agent)[]>;
|
|
2434
|
+
getConsumersOfSchema: (path: string) => Promise<(Service | Agent | Domain)[]>;
|
|
2459
2435
|
/**
|
|
2460
2436
|
* Returns the producers of a given schema path
|
|
2461
2437
|
* @param path - The path to the schema to get the producers for
|
|
2462
2438
|
* @returns (Service|Agent)[]
|
|
2463
2439
|
*/
|
|
2464
|
-
getProducersOfSchema: (path: string) => Promise<(Service | Agent)[]>;
|
|
2440
|
+
getProducersOfSchema: (path: string) => Promise<(Service | Agent | Domain)[]>;
|
|
2465
2441
|
/**
|
|
2466
2442
|
* Returns the schema for a given message (event, command or query) by its id and version.
|
|
2467
2443
|
* If no version is given, the latest version is used.
|
|
@@ -3010,4 +2986,4 @@ declare const _default: (path: string) => {
|
|
|
3010
2986
|
toDSL: (resource: (Event | Command | Query | Service | Domain) | (Event | Command | Query | Service | Domain)[], options: ToDSLOptions) => Promise<string>;
|
|
3011
2987
|
};
|
|
3012
2988
|
|
|
3013
|
-
export { type Adr, type AdrPointer, type AdrResourcePointer, type AdrStatus, type Agent, type AgentModel, type AgentTool, 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, type FlowAgentStepInput, 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 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 UbiquitousLanguage, type UbiquitousLanguageDictionary, type User, _default as default };
|
|
2989
|
+
export { type Adr, type AdrPointer, type AdrResourcePointer, type AdrStatus, type Agent, type AgentModel, type AgentTool, 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 ExtensionProperties, 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 Message, type MessagePointerInput, 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 };
|
package/dist/index.js
CHANGED
|
@@ -863,13 +863,16 @@ var copyDir = async (catalogDir, source, target, filter) => {
|
|
|
863
863
|
});
|
|
864
864
|
import_node_fs.default.rmSync(tmpDirectory, { recursive: true });
|
|
865
865
|
};
|
|
866
|
-
var buildMessagePointer = (message) => {
|
|
866
|
+
var buildMessagePointer = (message, options = {}) => {
|
|
867
867
|
const pointer = {
|
|
868
868
|
id: message.id,
|
|
869
869
|
version: message.version
|
|
870
870
|
};
|
|
871
871
|
if (message.fields) pointer.fields = message.fields;
|
|
872
872
|
if (message.group) pointer.group = message.group;
|
|
873
|
+
if (options.includeTriggers && message.triggers) {
|
|
874
|
+
pointer.triggers = message.triggers.map((trigger) => ({ ...trigger }));
|
|
875
|
+
}
|
|
873
876
|
return pointer;
|
|
874
877
|
};
|
|
875
878
|
var uniqueVersions = (messages) => {
|
|
@@ -1419,7 +1422,7 @@ var addMessageToService = (directory) => async (id, direction, event, version) =
|
|
|
1419
1422
|
return;
|
|
1420
1423
|
}
|
|
1421
1424
|
}
|
|
1422
|
-
service.receives.push(buildMessagePointer(event));
|
|
1425
|
+
service.receives.push(buildMessagePointer(event, { includeTriggers: true }));
|
|
1423
1426
|
} else {
|
|
1424
1427
|
throw new Error(`Direction ${direction} is invalid, only 'receives' and 'sends' are supported`);
|
|
1425
1428
|
}
|
|
@@ -1701,7 +1704,7 @@ var addMessageToAgent = (directory) => async (id, direction, message, version) =
|
|
|
1701
1704
|
return;
|
|
1702
1705
|
}
|
|
1703
1706
|
}
|
|
1704
|
-
agent.receives.push(buildMessagePointer(message));
|
|
1707
|
+
agent.receives.push(buildMessagePointer(message, { includeTriggers: true }));
|
|
1705
1708
|
} else {
|
|
1706
1709
|
throw new Error(`Direction ${direction} is invalid, only 'receives' and 'sends' are supported`);
|
|
1707
1710
|
}
|
|
@@ -1961,7 +1964,7 @@ var addMessageToDomain = (directory) => async (id, direction, message, version)
|
|
|
1961
1964
|
return;
|
|
1962
1965
|
}
|
|
1963
1966
|
}
|
|
1964
|
-
domain.receives.push(buildMessagePointer(message));
|
|
1967
|
+
domain.receives.push(buildMessagePointer(message, { includeTriggers: true }));
|
|
1965
1968
|
} else {
|
|
1966
1969
|
throw new Error(`Direction ${direction} is invalid, only 'receives' and 'sends' are supported`);
|
|
1967
1970
|
}
|
|
@@ -2057,9 +2060,10 @@ var getMessageBySchemaPath = (directory) => async (path9, options) => {
|
|
|
2057
2060
|
}
|
|
2058
2061
|
};
|
|
2059
2062
|
var getProducersAndConsumersForMessage = (directory) => async (id, version, options) => {
|
|
2060
|
-
const [services = [], agents = []] = await Promise.all([
|
|
2063
|
+
const [services = [], agents = [], domains = []] = await Promise.all([
|
|
2061
2064
|
getServices(directory)({ latestOnly: options?.latestOnly ?? true }),
|
|
2062
|
-
getAgents(directory)({ latestOnly: options?.latestOnly ?? true })
|
|
2065
|
+
getAgents(directory)({ latestOnly: options?.latestOnly ?? true }),
|
|
2066
|
+
getDomains(directory)({ latestOnly: options?.latestOnly ?? true })
|
|
2063
2067
|
]);
|
|
2064
2068
|
const message = await getResource(directory, id, version, { type: "message" });
|
|
2065
2069
|
const isMessageLatestVersion = await isLatestVersion(directory, id, version);
|
|
@@ -2068,7 +2072,7 @@ var getProducersAndConsumersForMessage = (directory) => async (id, version, opti
|
|
|
2068
2072
|
}
|
|
2069
2073
|
const producers = [];
|
|
2070
2074
|
const consumers = [];
|
|
2071
|
-
for (const participant of [...services, ...agents]) {
|
|
2075
|
+
for (const participant of [...services, ...agents, ...domains]) {
|
|
2072
2076
|
const participantPublishesMessage = participant.sends?.some((_message) => {
|
|
2073
2077
|
if (_message.version) {
|
|
2074
2078
|
const isParticipantUsingSemverRange = (0, import_semver5.validRange)(_message.version);
|