@eventcatalog/sdk 2.10.0 → 2.12.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/README.md +86 -1
- package/dist/cli/index.d.mts +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/{eventcatalog.js → cli/index.js} +691 -347
- package/dist/cli/index.js.map +1 -0
- package/dist/{eventcatalog.mjs → cli/index.mjs} +765 -401
- package/dist/cli/index.mjs.map +1 -0
- package/dist/cli-docs.d.mts +43 -0
- package/dist/cli-docs.d.ts +43 -0
- package/dist/cli-docs.js +1513 -0
- package/dist/cli-docs.js.map +1 -0
- package/dist/cli-docs.mjs +1485 -0
- package/dist/cli-docs.mjs.map +1 -0
- package/dist/index.d.mts +504 -4
- package/dist/index.d.ts +504 -4
- package/dist/index.js +325 -108
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +325 -108
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -4
- package/dist/channels.d.mts +0 -214
- package/dist/channels.d.ts +0 -214
- package/dist/channels.js +0 -432
- package/dist/channels.js.map +0 -1
- package/dist/channels.mjs +0 -384
- package/dist/channels.mjs.map +0 -1
- package/dist/commands.d.mts +0 -274
- package/dist/commands.d.ts +0 -274
- package/dist/commands.js +0 -394
- package/dist/commands.js.map +0 -1
- package/dist/commands.mjs +0 -350
- package/dist/commands.mjs.map +0 -1
- package/dist/containers.d.mts +0 -179
- package/dist/containers.d.ts +0 -179
- package/dist/containers.js +0 -388
- package/dist/containers.js.map +0 -1
- package/dist/containers.mjs +0 -345
- package/dist/containers.mjs.map +0 -1
- package/dist/custom-docs.d.mts +0 -89
- package/dist/custom-docs.d.ts +0 -89
- package/dist/custom-docs.js +0 -164
- package/dist/custom-docs.js.map +0 -1
- package/dist/custom-docs.mjs +0 -122
- package/dist/custom-docs.mjs.map +0 -1
- package/dist/data-stores.d.mts +0 -179
- package/dist/data-stores.d.ts +0 -179
- package/dist/data-stores.js +0 -401
- package/dist/data-stores.js.map +0 -1
- package/dist/data-stores.mjs +0 -356
- package/dist/data-stores.mjs.map +0 -1
- package/dist/domains.d.mts +0 -297
- package/dist/domains.d.ts +0 -297
- package/dist/domains.js +0 -480
- package/dist/domains.js.map +0 -1
- package/dist/domains.mjs +0 -433
- package/dist/domains.mjs.map +0 -1
- package/dist/entities.d.mts +0 -174
- package/dist/entities.d.ts +0 -174
- package/dist/entities.js +0 -348
- package/dist/entities.js.map +0 -1
- package/dist/entities.mjs +0 -307
- package/dist/entities.mjs.map +0 -1
- package/dist/eventcatalog.d.mts +0 -21
- package/dist/eventcatalog.d.ts +0 -21
- package/dist/eventcatalog.js.map +0 -1
- package/dist/eventcatalog.mjs.map +0 -1
- package/dist/events.d.mts +0 -276
- package/dist/events.d.ts +0 -276
- package/dist/events.js +0 -393
- package/dist/events.js.map +0 -1
- package/dist/events.mjs +0 -349
- package/dist/events.mjs.map +0 -1
- package/dist/messages.d.mts +0 -65
- package/dist/messages.d.ts +0 -65
- package/dist/messages.js +0 -312
- package/dist/messages.js.map +0 -1
- package/dist/messages.mjs +0 -269
- package/dist/messages.mjs.map +0 -1
- package/dist/queries.d.mts +0 -276
- package/dist/queries.d.ts +0 -276
- package/dist/queries.js +0 -394
- package/dist/queries.js.map +0 -1
- package/dist/queries.mjs +0 -350
- package/dist/queries.mjs.map +0 -1
- package/dist/services.d.mts +0 -384
- package/dist/services.d.ts +0 -384
- package/dist/services.js +0 -577
- package/dist/services.js.map +0 -1
- package/dist/services.mjs +0 -526
- package/dist/services.mjs.map +0 -1
- package/dist/teams.d.mts +0 -90
- package/dist/teams.d.ts +0 -90
- package/dist/teams.js +0 -246
- package/dist/teams.js.map +0 -1
- package/dist/teams.mjs +0 -202
- package/dist/teams.mjs.map +0 -1
- package/dist/types.d.d.mts +0 -304
- package/dist/types.d.d.ts +0 -304
- package/dist/types.d.js +0 -19
- package/dist/types.d.js.map +0 -1
- package/dist/types.d.mjs +0 -1
- package/dist/types.d.mjs.map +0 -1
- package/dist/users.d.mts +0 -83
- package/dist/users.d.ts +0 -83
- package/dist/users.js +0 -127
- package/dist/users.js.map +0 -1
- package/dist/users.mjs +0 -88
- package/dist/users.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,332 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// Base type for all resources (domains, services and messages)
|
|
2
|
+
interface BaseSchema {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
summary?: string;
|
|
6
|
+
version: string;
|
|
7
|
+
badges?: Badge[];
|
|
8
|
+
sidebar?: {
|
|
9
|
+
badge?: string;
|
|
10
|
+
};
|
|
11
|
+
owners?: string[];
|
|
12
|
+
schemaPath?: string;
|
|
13
|
+
markdown: string;
|
|
14
|
+
repository?: {
|
|
15
|
+
language?: string;
|
|
16
|
+
url?: string;
|
|
17
|
+
};
|
|
18
|
+
deprecated?:
|
|
19
|
+
| boolean
|
|
20
|
+
| {
|
|
21
|
+
date?: string;
|
|
22
|
+
message?: string;
|
|
23
|
+
};
|
|
24
|
+
styles?: {
|
|
25
|
+
icon?: string;
|
|
26
|
+
node?: {
|
|
27
|
+
color?: string;
|
|
28
|
+
label?: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
attachments?:
|
|
32
|
+
| string[]
|
|
33
|
+
| {
|
|
34
|
+
url: string;
|
|
35
|
+
title?: string;
|
|
36
|
+
type?: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
icon?: string;
|
|
39
|
+
}[];
|
|
40
|
+
resourceGroups?: ResourceGroup[];
|
|
41
|
+
diagrams?: ResourcePointer[];
|
|
42
|
+
editUrl?: string;
|
|
43
|
+
draft?: boolean | { title?: string; message?: string };
|
|
44
|
+
// SDK types
|
|
45
|
+
schema?: any;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
type ResourcePointer = {
|
|
49
|
+
id: string;
|
|
50
|
+
version?: string;
|
|
51
|
+
type?: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
type SendsPointer = {
|
|
55
|
+
id: string;
|
|
56
|
+
version?: string;
|
|
57
|
+
to?: ChannelPointer[];
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
type ReceivesPointer = {
|
|
61
|
+
id: string;
|
|
62
|
+
version?: string;
|
|
63
|
+
from?: ChannelPointer[];
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
interface ResourceGroup {
|
|
67
|
+
id?: string;
|
|
68
|
+
title?: string;
|
|
69
|
+
items: ResourcePointer[];
|
|
70
|
+
limit?: number;
|
|
71
|
+
sidebar?: boolean;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface ChannelPointer extends ResourcePointer {
|
|
75
|
+
parameters?: Record<string, string>;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
type Message = Event | Command | Query;
|
|
79
|
+
|
|
80
|
+
interface CustomDoc {
|
|
81
|
+
title: string;
|
|
82
|
+
summary: string;
|
|
83
|
+
slug?: string;
|
|
84
|
+
sidebar?: {
|
|
85
|
+
label: string;
|
|
86
|
+
order: number;
|
|
87
|
+
};
|
|
88
|
+
owners?: string[];
|
|
89
|
+
badges?: Badge[];
|
|
90
|
+
fileName?: string;
|
|
91
|
+
markdown: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface MessageDetailsPanelProperty {
|
|
95
|
+
producers?: DetailPanelProperty;
|
|
96
|
+
consumers?: DetailPanelProperty;
|
|
97
|
+
channels?: DetailPanelProperty;
|
|
98
|
+
versions?: DetailPanelProperty;
|
|
99
|
+
repository?: DetailPanelProperty;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
interface Event extends BaseSchema {
|
|
103
|
+
channels?: ChannelPointer[];
|
|
104
|
+
detailsPanel?: MessageDetailsPanelProperty;
|
|
105
|
+
}
|
|
106
|
+
interface Command extends BaseSchema {
|
|
107
|
+
channels?: ChannelPointer[];
|
|
108
|
+
detailsPanel?: MessageDetailsPanelProperty;
|
|
109
|
+
}
|
|
110
|
+
interface Query extends BaseSchema {
|
|
111
|
+
channels?: ChannelPointer[];
|
|
112
|
+
detailsPanel?: MessageDetailsPanelProperty;
|
|
113
|
+
}
|
|
114
|
+
interface Channel extends BaseSchema {
|
|
115
|
+
address?: string;
|
|
116
|
+
protocols?: string[];
|
|
117
|
+
routes?: ChannelPointer[];
|
|
118
|
+
detailsPanel?: {
|
|
119
|
+
producers?: DetailPanelProperty;
|
|
120
|
+
consumers?: DetailPanelProperty;
|
|
121
|
+
messages?: DetailPanelProperty;
|
|
122
|
+
protocols?: DetailPanelProperty;
|
|
123
|
+
versions?: DetailPanelProperty;
|
|
124
|
+
repository?: DetailPanelProperty;
|
|
125
|
+
owners?: DetailPanelProperty;
|
|
126
|
+
changelog?: DetailPanelProperty;
|
|
127
|
+
};
|
|
128
|
+
// parameters?: Record<string, Parameter>;
|
|
129
|
+
parameters?: {
|
|
130
|
+
[key: string]: {
|
|
131
|
+
enum?: string[];
|
|
132
|
+
default?: string;
|
|
133
|
+
examples?: string[];
|
|
134
|
+
description?: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
interface Specifications {
|
|
140
|
+
asyncapiPath?: string;
|
|
141
|
+
openapiPath?: string;
|
|
142
|
+
graphqlPath?: string;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
interface Specification {
|
|
146
|
+
type: 'openapi' | 'asyncapi' | 'graphql';
|
|
147
|
+
path: string;
|
|
148
|
+
name?: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
interface Service extends BaseSchema {
|
|
152
|
+
sends?: SendsPointer[];
|
|
153
|
+
receives?: ReceivesPointer[];
|
|
154
|
+
entities?: ResourcePointer[];
|
|
155
|
+
writesTo?: ResourcePointer[];
|
|
156
|
+
readsFrom?: ResourcePointer[];
|
|
157
|
+
specifications?: Specifications | Specification[];
|
|
158
|
+
detailsPanel?: {
|
|
159
|
+
domains?: DetailPanelProperty;
|
|
160
|
+
messages?: DetailPanelProperty;
|
|
161
|
+
versions?: DetailPanelProperty;
|
|
162
|
+
specifications?: DetailPanelProperty;
|
|
163
|
+
entities?: DetailPanelProperty;
|
|
164
|
+
repository?: DetailPanelProperty;
|
|
165
|
+
owners?: DetailPanelProperty;
|
|
166
|
+
changelog?: DetailPanelProperty;
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
interface Domain extends BaseSchema {
|
|
171
|
+
services?: ResourcePointer[];
|
|
172
|
+
domains?: ResourcePointer[];
|
|
173
|
+
entities?: ResourcePointer[];
|
|
174
|
+
dataProducts?: ResourcePointer[];
|
|
175
|
+
sends?: SendsPointer[];
|
|
176
|
+
receives?: ReceivesPointer[];
|
|
177
|
+
detailsPanel?: {
|
|
178
|
+
parentDomains?: DetailPanelProperty;
|
|
179
|
+
subdomains?: DetailPanelProperty;
|
|
180
|
+
services?: DetailPanelProperty;
|
|
181
|
+
entities?: DetailPanelProperty;
|
|
182
|
+
messages?: DetailPanelProperty;
|
|
183
|
+
ubiquitousLanguage?: DetailPanelProperty;
|
|
184
|
+
repository?: DetailPanelProperty;
|
|
185
|
+
versions?: DetailPanelProperty;
|
|
186
|
+
owners?: DetailPanelProperty;
|
|
187
|
+
changelog?: DetailPanelProperty;
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
interface Team {
|
|
192
|
+
id: string;
|
|
193
|
+
name: string;
|
|
194
|
+
summary?: string;
|
|
195
|
+
email?: string;
|
|
196
|
+
hidden?: boolean;
|
|
197
|
+
slackDirectMessageUrl?: string;
|
|
198
|
+
members?: User[];
|
|
199
|
+
ownedCommands?: Command[];
|
|
200
|
+
ownedServices?: Service[];
|
|
201
|
+
ownedEvents?: Event[];
|
|
202
|
+
markdown: string;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
interface User {
|
|
206
|
+
id: string;
|
|
207
|
+
name: string;
|
|
208
|
+
avatarUrl: string;
|
|
209
|
+
role?: string;
|
|
210
|
+
hidden?: boolean;
|
|
211
|
+
email?: string;
|
|
212
|
+
slackDirectMessageUrl?: string;
|
|
213
|
+
ownedServices?: Service[];
|
|
214
|
+
ownedEvents?: Event[];
|
|
215
|
+
ownedCommands?: Command[];
|
|
216
|
+
associatedTeams?: Team[];
|
|
217
|
+
markdown: string;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
interface Badge {
|
|
221
|
+
content: string;
|
|
222
|
+
backgroundColor: string;
|
|
223
|
+
textColor: string;
|
|
224
|
+
icon?: string;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
interface UbiquitousLanguage {
|
|
228
|
+
id: string;
|
|
229
|
+
name: string;
|
|
230
|
+
summary?: string;
|
|
231
|
+
description?: string;
|
|
232
|
+
icon?: string;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
interface UbiquitousLanguageDictionary {
|
|
236
|
+
dictionary: UbiquitousLanguage[];
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
interface DetailPanelProperty {
|
|
240
|
+
visible: boolean;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
interface Entity extends BaseSchema {
|
|
244
|
+
aggregateRoot?: boolean;
|
|
245
|
+
identifier?: string;
|
|
246
|
+
properties?: {
|
|
247
|
+
name: string;
|
|
248
|
+
type: string;
|
|
249
|
+
required?: boolean;
|
|
250
|
+
description?: string;
|
|
251
|
+
references?: string;
|
|
252
|
+
referencesIdentifier?: string;
|
|
253
|
+
relationType?: string;
|
|
254
|
+
}[];
|
|
255
|
+
detailsPanel?: {
|
|
256
|
+
domains?: DetailPanelProperty;
|
|
257
|
+
services?: DetailPanelProperty;
|
|
258
|
+
messages?: DetailPanelProperty;
|
|
259
|
+
versions?: DetailPanelProperty;
|
|
260
|
+
owners?: DetailPanelProperty;
|
|
261
|
+
changelog?: DetailPanelProperty;
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
type DataProductOutputPointer = {
|
|
266
|
+
id: string;
|
|
267
|
+
version?: string;
|
|
268
|
+
contract?: {
|
|
269
|
+
path: string;
|
|
270
|
+
name: string;
|
|
271
|
+
type?: string;
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
interface DataProduct extends BaseSchema {
|
|
276
|
+
inputs?: ResourcePointer[];
|
|
277
|
+
outputs?: DataProductOutputPointer[];
|
|
278
|
+
detailsPanel?: {
|
|
279
|
+
domains?: DetailPanelProperty;
|
|
280
|
+
inputs?: DetailPanelProperty;
|
|
281
|
+
outputs?: DetailPanelProperty;
|
|
282
|
+
versions?: DetailPanelProperty;
|
|
283
|
+
repository?: DetailPanelProperty;
|
|
284
|
+
owners?: DetailPanelProperty;
|
|
285
|
+
changelog?: DetailPanelProperty;
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
declare enum DataClassification {
|
|
290
|
+
Public = 'public',
|
|
291
|
+
Internal = 'internal',
|
|
292
|
+
Confidential = 'confidential',
|
|
293
|
+
Regulated = 'regulated',
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
interface Container extends BaseSchema {
|
|
297
|
+
container_type: 'database' | 'cache' | 'objectStore' | 'searchIndex' | 'dataWarehouse' | 'dataLake' | 'externalSaaS' | 'other';
|
|
298
|
+
technology?: string;
|
|
299
|
+
authoritative?: boolean;
|
|
300
|
+
access_mode?: string;
|
|
301
|
+
classification?: DataClassification;
|
|
302
|
+
residency?: string;
|
|
303
|
+
retention?: string;
|
|
304
|
+
detailsPanel?: {
|
|
305
|
+
versions?: DetailPanelProperty;
|
|
306
|
+
repository?: DetailPanelProperty;
|
|
307
|
+
owners?: DetailPanelProperty;
|
|
308
|
+
changelog?: DetailPanelProperty;
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
type EventCatalog = {
|
|
313
|
+
version: string;
|
|
314
|
+
catalogVersion: string;
|
|
315
|
+
createdAt: string;
|
|
316
|
+
resources: {
|
|
317
|
+
domains?: ExportedResource<Domain>[];
|
|
318
|
+
services?: ExportedResource<Service>[];
|
|
319
|
+
messages?: {
|
|
320
|
+
events?: ExportedResource<Event>[];
|
|
321
|
+
queries?: ExportedResource<Query>[];
|
|
322
|
+
commands?: ExportedResource<Command>[];
|
|
323
|
+
};
|
|
324
|
+
teams?: ExportedResource<Team>[];
|
|
325
|
+
users?: ExportedResource<User>[];
|
|
326
|
+
channels?: ExportedResource<Channel>[];
|
|
327
|
+
customDocs?: ExportedResource<CustomDoc>[];
|
|
328
|
+
};
|
|
329
|
+
};
|
|
3
330
|
|
|
4
331
|
/**
|
|
5
332
|
* Init the SDK for EventCatalog
|
|
@@ -696,7 +1023,14 @@ declare const _default: (path: string) => {
|
|
|
696
1023
|
*
|
|
697
1024
|
*/
|
|
698
1025
|
writeDomain: (domain: Domain, options?: {
|
|
699
|
-
path
|
|
1026
|
+
path? /**
|
|
1027
|
+
* Adds an event to a service in EventCatalog
|
|
1028
|
+
*
|
|
1029
|
+
* @param event - The event to write to the service
|
|
1030
|
+
* @param service - The service and it's id to write to the event to
|
|
1031
|
+
* @param options - Optional options to write the event
|
|
1032
|
+
*
|
|
1033
|
+
*/: string;
|
|
700
1034
|
override?: boolean;
|
|
701
1035
|
versionExistingContent?: boolean;
|
|
702
1036
|
format?: "md" | "mdx";
|
|
@@ -802,6 +1136,69 @@ declare const _default: (path: string) => {
|
|
|
802
1136
|
id: string;
|
|
803
1137
|
version: string;
|
|
804
1138
|
}, version?: string) => Promise<void>;
|
|
1139
|
+
/**
|
|
1140
|
+
* Add an event to a domain by its id.
|
|
1141
|
+
*
|
|
1142
|
+
* @example
|
|
1143
|
+
* ```ts
|
|
1144
|
+
* import utils from '@eventcatalog/utils';
|
|
1145
|
+
*
|
|
1146
|
+
* const { addEventToDomain } = utils('/path/to/eventcatalog');
|
|
1147
|
+
*
|
|
1148
|
+
* // adds a new event (OrderCreated) that the Orders domain will send
|
|
1149
|
+
* await addEventToDomain('Orders', 'sends', { id: 'OrderCreated', version: '2.0.0' });
|
|
1150
|
+
*
|
|
1151
|
+
* // adds a new event (PaymentProcessed) that the Orders domain will receive
|
|
1152
|
+
* await addEventToDomain('Orders', 'receives', { id: 'PaymentProcessed', version: '2.0.0' });
|
|
1153
|
+
*
|
|
1154
|
+
* ```
|
|
1155
|
+
*/
|
|
1156
|
+
addEventToDomain: (id: string, direction: string, message: {
|
|
1157
|
+
id: string;
|
|
1158
|
+
version: string;
|
|
1159
|
+
}, version?: string) => Promise<void>;
|
|
1160
|
+
/**
|
|
1161
|
+
* Add a command to a domain by its id.
|
|
1162
|
+
*
|
|
1163
|
+
* @example
|
|
1164
|
+
* ```ts
|
|
1165
|
+
* import utils from '@eventcatalog/utils';
|
|
1166
|
+
*
|
|
1167
|
+
* const { addCommandToDomain } = utils('/path/to/eventcatalog');
|
|
1168
|
+
*
|
|
1169
|
+
* // adds a new command (ProcessOrder) that the Orders domain will send
|
|
1170
|
+
* await addCommandToDomain('Orders', 'sends', { id: 'ProcessOrder', version: '2.0.0' });
|
|
1171
|
+
*
|
|
1172
|
+
* // adds a new command (CancelOrder) that the Orders domain will receive
|
|
1173
|
+
* await addCommandToDomain('Orders', 'receives', { id: 'CancelOrder', version: '2.0.0' });
|
|
1174
|
+
*
|
|
1175
|
+
* ```
|
|
1176
|
+
*/
|
|
1177
|
+
addCommandToDomain: (id: string, direction: string, message: {
|
|
1178
|
+
id: string;
|
|
1179
|
+
version: string;
|
|
1180
|
+
}, version?: string) => Promise<void>;
|
|
1181
|
+
/**
|
|
1182
|
+
* Add a query to a domain by its id.
|
|
1183
|
+
*
|
|
1184
|
+
* @example
|
|
1185
|
+
* ```ts
|
|
1186
|
+
* import utils from '@eventcatalog/utils';
|
|
1187
|
+
*
|
|
1188
|
+
* const { addQueryToDomain } = utils('/path/to/eventcatalog');
|
|
1189
|
+
*
|
|
1190
|
+
* // adds a new query (GetOrderStatus) that the Orders domain will send
|
|
1191
|
+
* await addQueryToDomain('Orders', 'sends', { id: 'GetOrderStatus', version: '2.0.0' });
|
|
1192
|
+
*
|
|
1193
|
+
* // adds a new query (GetInventory) that the Orders domain will receive
|
|
1194
|
+
* await addQueryToDomain('Orders', 'receives', { id: 'GetInventory', version: '2.0.0' });
|
|
1195
|
+
*
|
|
1196
|
+
* ```
|
|
1197
|
+
*/
|
|
1198
|
+
addQueryToDomain: (id: string, direction: string, message: {
|
|
1199
|
+
id: string;
|
|
1200
|
+
version: string;
|
|
1201
|
+
}, version?: string) => Promise<void>;
|
|
805
1202
|
/**
|
|
806
1203
|
* ================================
|
|
807
1204
|
* Teams
|
|
@@ -1116,8 +1513,111 @@ declare const _default: (path: string) => {
|
|
|
1116
1513
|
}, options?: {
|
|
1117
1514
|
path?: string;
|
|
1118
1515
|
format?: "md" | "mdx";
|
|
1516
|
+
override? /**
|
|
1517
|
+
* Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1518
|
+
*
|
|
1519
|
+
* @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
|
|
1520
|
+
*
|
|
1521
|
+
*/: boolean;
|
|
1522
|
+
}) => Promise<void>;
|
|
1523
|
+
/**
|
|
1524
|
+
* ================================
|
|
1525
|
+
* Data Products
|
|
1526
|
+
* ================================
|
|
1527
|
+
*/
|
|
1528
|
+
/**
|
|
1529
|
+
* Adds a data product to EventCatalog
|
|
1530
|
+
* @param dataProduct - The data product to write
|
|
1531
|
+
* @param options - Optional options to write the data product
|
|
1532
|
+
*
|
|
1533
|
+
*/
|
|
1534
|
+
writeDataProduct: (dataProduct: DataProduct, options?: {
|
|
1535
|
+
path?: string;
|
|
1119
1536
|
override?: boolean;
|
|
1537
|
+
versionExistingContent?: boolean;
|
|
1538
|
+
format?: "md" | "mdx";
|
|
1539
|
+
}) => Promise<void>;
|
|
1540
|
+
/**
|
|
1541
|
+
* Writes a data product to a domain in EventCatalog
|
|
1542
|
+
* @param dataProduct - The data product to write
|
|
1543
|
+
* @param domain - The domain to write the data product to
|
|
1544
|
+
* @param options - Optional options to write the data product
|
|
1545
|
+
*
|
|
1546
|
+
*/
|
|
1547
|
+
writeDataProductToDomain: (dataProduct: DataProduct, domain: {
|
|
1548
|
+
id: string;
|
|
1549
|
+
version?: string;
|
|
1550
|
+
}, options?: {
|
|
1551
|
+
path?: string;
|
|
1552
|
+
format?: "md" | "mdx";
|
|
1553
|
+
override? /**
|
|
1554
|
+
* Adds a schema to the given event
|
|
1555
|
+
* @param id - The id of the event to add the schema to
|
|
1556
|
+
* @param schema - Schema contents to add including the content and the file name
|
|
1557
|
+
* @param version - Optional version of the event to add the schema to
|
|
1558
|
+
* @returns
|
|
1559
|
+
*/: boolean;
|
|
1120
1560
|
}) => Promise<void>;
|
|
1561
|
+
/**
|
|
1562
|
+
* Returns a data product from EventCatalog
|
|
1563
|
+
* @param id - The id of the data product to retrieve
|
|
1564
|
+
* @param version - Optional id of the version to get (supports semver)
|
|
1565
|
+
* @returns DataProduct|Undefined
|
|
1566
|
+
*/
|
|
1567
|
+
getDataProduct: (id: string, version?: string) => Promise<DataProduct>;
|
|
1568
|
+
/**
|
|
1569
|
+
* Returns all data products from EventCatalog
|
|
1570
|
+
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1571
|
+
* @returns DataProduct[]|Undefined
|
|
1572
|
+
*/
|
|
1573
|
+
getDataProducts: (options?: {
|
|
1574
|
+
latestOnly?: boolean;
|
|
1575
|
+
}) => Promise<DataProduct[]>;
|
|
1576
|
+
/**
|
|
1577
|
+
* Version a data product by its id
|
|
1578
|
+
* @param id - The id of the data product to version
|
|
1579
|
+
*/
|
|
1580
|
+
versionDataProduct: (id: string) => Promise<void>;
|
|
1581
|
+
/**
|
|
1582
|
+
* Remove a data product by its path
|
|
1583
|
+
* @param path - The path to the data product to remove
|
|
1584
|
+
*/
|
|
1585
|
+
rmDataProduct: (path: string) => Promise<void>;
|
|
1586
|
+
/**
|
|
1587
|
+
* Remove a data product by its id
|
|
1588
|
+
* @param id - The id of the data product to remove
|
|
1589
|
+
* @param version - Optional version of the data product to remove
|
|
1590
|
+
*/
|
|
1591
|
+
rmDataProductById: (id: string, version?: string, persistFiles?: boolean) => Promise<void>;
|
|
1592
|
+
/**
|
|
1593
|
+
* Check to see if a data product version exists
|
|
1594
|
+
* @param id - The id of the data product
|
|
1595
|
+
* @param version - The version of the data product (supports semver)
|
|
1596
|
+
* @returns
|
|
1597
|
+
*/
|
|
1598
|
+
dataProductHasVersion: (id: string, version?: string) => Promise<boolean>;
|
|
1599
|
+
/**
|
|
1600
|
+
* Adds a file to a data product by its id
|
|
1601
|
+
* @param id - The id of the data product to add the file to
|
|
1602
|
+
* @param file - File contents to add including the content and the file name
|
|
1603
|
+
* @param version - Optional version of the data product to add the file to
|
|
1604
|
+
* @returns
|
|
1605
|
+
*/
|
|
1606
|
+
addFileToDataProduct: (id: string, file: {
|
|
1607
|
+
content: string;
|
|
1608
|
+
fileName: string;
|
|
1609
|
+
}, version?: string) => Promise<void>;
|
|
1610
|
+
/**
|
|
1611
|
+
* Adds a data product to a domain
|
|
1612
|
+
* @param id - The id of the domain
|
|
1613
|
+
* @param dataProduct - The id and version of the data product to add
|
|
1614
|
+
* @param version - (Optional) The version of the domain to add the data product to
|
|
1615
|
+
* @returns
|
|
1616
|
+
*/
|
|
1617
|
+
addDataProductToDomain: (id: string, dataProduct: {
|
|
1618
|
+
id: string;
|
|
1619
|
+
version: string;
|
|
1620
|
+
}, version?: string) => Promise<void>;
|
|
1121
1621
|
};
|
|
1122
1622
|
|
|
1123
|
-
export { Channel, Command, Container, CustomDoc, Domain, Entity, Event, EventCatalog, Message, Query, Service, Team, UbiquitousLanguageDictionary, User, _default as default };
|
|
1623
|
+
export { type Badge, type BaseSchema, type Channel, type ChannelPointer, type Command, type Container, type CustomDoc, type DataProduct, type DataProductOutputPointer, type Domain, type Entity, type Event, type EventCatalog, type Message, type Query, type ReceivesPointer, type ResourceGroup, type ResourcePointer, type SendsPointer, type Service, type Specification, type Specifications, type Team, type UbiquitousLanguage, type UbiquitousLanguageDictionary, type User, _default as default };
|