@eventcatalog/cli 0.1.0 → 0.2.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/package.json +2 -2
- package/dist/cli/index.d.mts +0 -1
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +0 -171
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/index.mjs +0 -155
- package/dist/cli/index.mjs.map +0 -1
- package/dist/cli-docs.d.mts +0 -43
- package/dist/cli-docs.d.ts +0 -43
- package/dist/cli-docs.js +0 -1614
- package/dist/cli-docs.js.map +0 -1
- package/dist/cli-docs.mjs +0 -1586
- package/dist/cli-docs.mjs.map +0 -1
package/dist/cli-docs.js
DELETED
|
@@ -1,1614 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/cli-docs.ts
|
|
21
|
-
var cli_docs_exports = {};
|
|
22
|
-
__export(cli_docs_exports, {
|
|
23
|
-
cliFunctions: () => cliFunctions,
|
|
24
|
-
getCategories: () => getCategories,
|
|
25
|
-
getFunction: () => getFunction,
|
|
26
|
-
getFunctionsByCategory: () => getFunctionsByCategory
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(cli_docs_exports);
|
|
29
|
-
var cliFunctions = [
|
|
30
|
-
// ================================
|
|
31
|
-
// Events
|
|
32
|
-
// ================================
|
|
33
|
-
{
|
|
34
|
-
name: "getEvent",
|
|
35
|
-
description: "Returns an event from EventCatalog by its ID",
|
|
36
|
-
category: "Events",
|
|
37
|
-
args: [
|
|
38
|
-
{ name: "id", type: "string", required: true, description: "The ID of the event to retrieve" },
|
|
39
|
-
{ name: "version", type: "string", required: false, description: "Specific version to retrieve (supports semver)" },
|
|
40
|
-
{ name: "options", type: "json", required: false, description: 'Options object, e.g. {"attachSchema": true}' }
|
|
41
|
-
],
|
|
42
|
-
examples: [
|
|
43
|
-
{ description: "Get the latest version of an event", command: 'npx @eventcatalog/cli getEvent "OrderCreated"' },
|
|
44
|
-
{ description: "Get a specific version", command: 'npx @eventcatalog/cli getEvent "OrderCreated" "1.0.0"' },
|
|
45
|
-
{
|
|
46
|
-
description: "Get event with schema attached",
|
|
47
|
-
command: `npx @eventcatalog/cli getEvent "OrderCreated" "1.0.0" '{"attachSchema":true}'`
|
|
48
|
-
}
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
name: "getEvents",
|
|
53
|
-
description: "Returns all events from EventCatalog",
|
|
54
|
-
category: "Events",
|
|
55
|
-
args: [
|
|
56
|
-
{
|
|
57
|
-
name: "options",
|
|
58
|
-
type: "json",
|
|
59
|
-
required: false,
|
|
60
|
-
description: 'Options object, e.g. {"latestOnly": true, "attachSchema": true}'
|
|
61
|
-
}
|
|
62
|
-
],
|
|
63
|
-
examples: [
|
|
64
|
-
{ description: "Get all events", command: "npx @eventcatalog/cli getEvents" },
|
|
65
|
-
{ description: "Get only latest versions", command: `npx @eventcatalog/cli getEvents '{"latestOnly":true}'` },
|
|
66
|
-
{
|
|
67
|
-
description: "Get all events with schemas",
|
|
68
|
-
command: `npx @eventcatalog/cli getEvents '{"latestOnly":true,"attachSchema":true}'`
|
|
69
|
-
}
|
|
70
|
-
]
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
name: "writeEvent",
|
|
74
|
-
description: "Writes an event to EventCatalog",
|
|
75
|
-
category: "Events",
|
|
76
|
-
args: [
|
|
77
|
-
{ name: "event", type: "json", required: true, description: "Event object with id, name, version, and markdown" },
|
|
78
|
-
{
|
|
79
|
-
name: "options",
|
|
80
|
-
type: "json",
|
|
81
|
-
required: false,
|
|
82
|
-
description: "Options: {path?, override?, versionExistingContent?, format?}"
|
|
83
|
-
}
|
|
84
|
-
],
|
|
85
|
-
examples: [
|
|
86
|
-
{
|
|
87
|
-
description: "Write a new event",
|
|
88
|
-
command: `npx @eventcatalog/cli writeEvent '{"id":"OrderCreated","name":"Order Created","version":"1.0.0","markdown":"# Order Created"}'`
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
description: "Write and version existing content",
|
|
92
|
-
command: `npx @eventcatalog/cli writeEvent '{"id":"OrderCreated","name":"Order Created","version":"2.0.0","markdown":"# Order Created v2"}' '{"versionExistingContent":true}'`
|
|
93
|
-
}
|
|
94
|
-
]
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
name: "writeEventToService",
|
|
98
|
-
description: "Writes an event to a specific service in EventCatalog",
|
|
99
|
-
category: "Events",
|
|
100
|
-
args: [
|
|
101
|
-
{ name: "event", type: "json", required: true, description: "Event object with id, name, version, and markdown" },
|
|
102
|
-
{ name: "service", type: "json", required: true, description: "Service reference: {id, version?}" },
|
|
103
|
-
{ name: "options", type: "json", required: false, description: "Options: {path?, format?, override?}" }
|
|
104
|
-
],
|
|
105
|
-
examples: [
|
|
106
|
-
{
|
|
107
|
-
description: "Write event to a service",
|
|
108
|
-
command: `npx @eventcatalog/cli writeEventToService '{"id":"InventoryUpdated","name":"Inventory Updated","version":"1.0.0","markdown":"# Inventory Updated"}' '{"id":"InventoryService"}'`
|
|
109
|
-
}
|
|
110
|
-
]
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: "rmEvent",
|
|
114
|
-
description: "Removes an event by its path",
|
|
115
|
-
category: "Events",
|
|
116
|
-
args: [{ name: "path", type: "string", required: true, description: "Path to the event, e.g. /InventoryAdjusted" }],
|
|
117
|
-
examples: [{ description: "Remove an event by path", command: 'npx @eventcatalog/cli rmEvent "/InventoryAdjusted"' }]
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
name: "rmEventById",
|
|
121
|
-
description: "Removes an event by its ID",
|
|
122
|
-
category: "Events",
|
|
123
|
-
args: [
|
|
124
|
-
{ name: "id", type: "string", required: true, description: "The ID of the event to remove" },
|
|
125
|
-
{ name: "version", type: "string", required: false, description: "Specific version to remove" }
|
|
126
|
-
],
|
|
127
|
-
examples: [
|
|
128
|
-
{ description: "Remove latest version", command: 'npx @eventcatalog/cli rmEventById "OrderCreated"' },
|
|
129
|
-
{ description: "Remove specific version", command: 'npx @eventcatalog/cli rmEventById "OrderCreated" "1.0.0"' }
|
|
130
|
-
]
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
name: "versionEvent",
|
|
134
|
-
description: "Moves the current event to a versioned directory",
|
|
135
|
-
category: "Events",
|
|
136
|
-
args: [{ name: "id", type: "string", required: true, description: "The ID of the event to version" }],
|
|
137
|
-
examples: [{ description: "Version an event", command: 'npx @eventcatalog/cli versionEvent "OrderCreated"' }]
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
name: "addFileToEvent",
|
|
141
|
-
description: "Adds a file to an event",
|
|
142
|
-
category: "Events",
|
|
143
|
-
args: [
|
|
144
|
-
{ name: "id", type: "string", required: true, description: "The ID of the event" },
|
|
145
|
-
{ name: "file", type: "json", required: true, description: "File object: {content, fileName}" },
|
|
146
|
-
{ name: "version", type: "string", required: false, description: "Specific version to add file to" }
|
|
147
|
-
],
|
|
148
|
-
examples: [
|
|
149
|
-
{
|
|
150
|
-
description: "Add a file to an event",
|
|
151
|
-
command: `npx @eventcatalog/cli addFileToEvent "OrderCreated" '{"content":"# Schema","fileName":"schema.md"}'`
|
|
152
|
-
}
|
|
153
|
-
]
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
name: "addSchemaToEvent",
|
|
157
|
-
description: "Adds a schema file to an event",
|
|
158
|
-
category: "Events",
|
|
159
|
-
args: [
|
|
160
|
-
{ name: "id", type: "string", required: true, description: "The ID of the event" },
|
|
161
|
-
{ name: "schema", type: "json", required: true, description: "Schema object: {schema, fileName}" },
|
|
162
|
-
{ name: "version", type: "string", required: false, description: "Specific version to add schema to" }
|
|
163
|
-
],
|
|
164
|
-
examples: [
|
|
165
|
-
{
|
|
166
|
-
description: "Add a JSON schema to an event",
|
|
167
|
-
command: `npx @eventcatalog/cli addSchemaToEvent "OrderCreated" '{"schema":"{\\"type\\":\\"object\\"}","fileName":"schema.json"}'`
|
|
168
|
-
}
|
|
169
|
-
]
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
name: "eventHasVersion",
|
|
173
|
-
description: "Checks if a specific version of an event exists",
|
|
174
|
-
category: "Events",
|
|
175
|
-
args: [
|
|
176
|
-
{ name: "id", type: "string", required: true, description: "The ID of the event" },
|
|
177
|
-
{ name: "version", type: "string", required: true, description: "Version to check (supports semver)" }
|
|
178
|
-
],
|
|
179
|
-
examples: [
|
|
180
|
-
{ description: "Check if version exists", command: 'npx @eventcatalog/cli eventHasVersion "OrderCreated" "1.0.0"' },
|
|
181
|
-
{ description: "Check with semver range", command: 'npx @eventcatalog/cli eventHasVersion "OrderCreated" "1.0.x"' }
|
|
182
|
-
]
|
|
183
|
-
},
|
|
184
|
-
// ================================
|
|
185
|
-
// Commands
|
|
186
|
-
// ================================
|
|
187
|
-
{
|
|
188
|
-
name: "getCommand",
|
|
189
|
-
description: "Returns a command from EventCatalog by its ID",
|
|
190
|
-
category: "Commands",
|
|
191
|
-
args: [
|
|
192
|
-
{ name: "id", type: "string", required: true, description: "The ID of the command to retrieve" },
|
|
193
|
-
{ name: "version", type: "string", required: false, description: "Specific version to retrieve (supports semver)" }
|
|
194
|
-
],
|
|
195
|
-
examples: [
|
|
196
|
-
{ description: "Get the latest command", command: 'npx @eventcatalog/cli getCommand "CreateOrder"' },
|
|
197
|
-
{ description: "Get a specific version", command: 'npx @eventcatalog/cli getCommand "CreateOrder" "1.0.0"' }
|
|
198
|
-
]
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
name: "getCommands",
|
|
202
|
-
description: "Returns all commands from EventCatalog",
|
|
203
|
-
category: "Commands",
|
|
204
|
-
args: [{ name: "options", type: "json", required: false, description: "Options: {latestOnly?, attachSchema?}" }],
|
|
205
|
-
examples: [
|
|
206
|
-
{ description: "Get all commands", command: "npx @eventcatalog/cli getCommands" },
|
|
207
|
-
{ description: "Get only latest versions", command: `npx @eventcatalog/cli getCommands '{"latestOnly":true}'` }
|
|
208
|
-
]
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
name: "writeCommand",
|
|
212
|
-
description: "Writes a command to EventCatalog",
|
|
213
|
-
category: "Commands",
|
|
214
|
-
args: [
|
|
215
|
-
{ name: "command", type: "json", required: true, description: "Command object with id, name, version, and markdown" },
|
|
216
|
-
{ name: "options", type: "json", required: false, description: "Options: {path?, override?, versionExistingContent?}" }
|
|
217
|
-
],
|
|
218
|
-
examples: [
|
|
219
|
-
{
|
|
220
|
-
description: "Write a new command",
|
|
221
|
-
command: `npx @eventcatalog/cli writeCommand '{"id":"CreateOrder","name":"Create Order","version":"1.0.0","markdown":"# Create Order"}'`
|
|
222
|
-
}
|
|
223
|
-
]
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
name: "writeCommandToService",
|
|
227
|
-
description: "Writes a command to a specific service",
|
|
228
|
-
category: "Commands",
|
|
229
|
-
args: [
|
|
230
|
-
{ name: "command", type: "json", required: true, description: "Command object" },
|
|
231
|
-
{ name: "service", type: "json", required: true, description: "Service reference: {id, version?}" },
|
|
232
|
-
{ name: "options", type: "json", required: false, description: "Options: {path?, format?, override?}" }
|
|
233
|
-
],
|
|
234
|
-
examples: [
|
|
235
|
-
{
|
|
236
|
-
description: "Write command to a service",
|
|
237
|
-
command: `npx @eventcatalog/cli writeCommandToService '{"id":"UpdateInventory","name":"Update Inventory","version":"1.0.0","markdown":"# Update Inventory"}' '{"id":"InventoryService"}'`
|
|
238
|
-
}
|
|
239
|
-
]
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
name: "rmCommand",
|
|
243
|
-
description: "Removes a command by its path",
|
|
244
|
-
category: "Commands",
|
|
245
|
-
args: [{ name: "path", type: "string", required: true, description: "Path to the command" }],
|
|
246
|
-
examples: [{ description: "Remove a command", command: 'npx @eventcatalog/cli rmCommand "/CreateOrder"' }]
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
name: "rmCommandById",
|
|
250
|
-
description: "Removes a command by its ID",
|
|
251
|
-
category: "Commands",
|
|
252
|
-
args: [
|
|
253
|
-
{ name: "id", type: "string", required: true, description: "The ID of the command to remove" },
|
|
254
|
-
{ name: "version", type: "string", required: false, description: "Specific version to remove" }
|
|
255
|
-
],
|
|
256
|
-
examples: [{ description: "Remove a command", command: 'npx @eventcatalog/cli rmCommandById "CreateOrder"' }]
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
name: "versionCommand",
|
|
260
|
-
description: "Moves the current command to a versioned directory",
|
|
261
|
-
category: "Commands",
|
|
262
|
-
args: [{ name: "id", type: "string", required: true, description: "The ID of the command to version" }],
|
|
263
|
-
examples: [{ description: "Version a command", command: 'npx @eventcatalog/cli versionCommand "CreateOrder"' }]
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
name: "addFileToCommand",
|
|
267
|
-
description: "Adds a file to a command",
|
|
268
|
-
category: "Commands",
|
|
269
|
-
args: [
|
|
270
|
-
{ name: "id", type: "string", required: true, description: "The ID of the command" },
|
|
271
|
-
{ name: "file", type: "json", required: true, description: "File object: {content, fileName}" },
|
|
272
|
-
{ name: "version", type: "string", required: false, description: "Specific version" }
|
|
273
|
-
],
|
|
274
|
-
examples: [
|
|
275
|
-
{
|
|
276
|
-
description: "Add a file to a command",
|
|
277
|
-
command: `npx @eventcatalog/cli addFileToCommand "CreateOrder" '{"content":"# Notes","fileName":"notes.md"}'`
|
|
278
|
-
}
|
|
279
|
-
]
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
name: "addSchemaToCommand",
|
|
283
|
-
description: "Adds a schema to a command",
|
|
284
|
-
category: "Commands",
|
|
285
|
-
args: [
|
|
286
|
-
{ name: "id", type: "string", required: true, description: "The ID of the command" },
|
|
287
|
-
{ name: "schema", type: "json", required: true, description: "Schema object: {schema, fileName}" },
|
|
288
|
-
{ name: "version", type: "string", required: false, description: "Specific version" }
|
|
289
|
-
],
|
|
290
|
-
examples: [
|
|
291
|
-
{
|
|
292
|
-
description: "Add a schema to a command",
|
|
293
|
-
command: `npx @eventcatalog/cli addSchemaToCommand "CreateOrder" '{"schema":"{\\"type\\":\\"object\\"}","fileName":"schema.json"}'`
|
|
294
|
-
}
|
|
295
|
-
]
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
name: "commandHasVersion",
|
|
299
|
-
description: "Checks if a specific version of a command exists",
|
|
300
|
-
category: "Commands",
|
|
301
|
-
args: [
|
|
302
|
-
{ name: "id", type: "string", required: true, description: "The ID of the command" },
|
|
303
|
-
{ name: "version", type: "string", required: true, description: "Version to check" }
|
|
304
|
-
],
|
|
305
|
-
examples: [
|
|
306
|
-
{ description: "Check if version exists", command: 'npx @eventcatalog/cli commandHasVersion "CreateOrder" "1.0.0"' }
|
|
307
|
-
]
|
|
308
|
-
},
|
|
309
|
-
// ================================
|
|
310
|
-
// Queries
|
|
311
|
-
// ================================
|
|
312
|
-
{
|
|
313
|
-
name: "getQuery",
|
|
314
|
-
description: "Returns a query from EventCatalog by its ID",
|
|
315
|
-
category: "Queries",
|
|
316
|
-
args: [
|
|
317
|
-
{ name: "id", type: "string", required: true, description: "The ID of the query to retrieve" },
|
|
318
|
-
{ name: "version", type: "string", required: false, description: "Specific version to retrieve" }
|
|
319
|
-
],
|
|
320
|
-
examples: [
|
|
321
|
-
{ description: "Get the latest query", command: 'npx @eventcatalog/cli getQuery "GetOrder"' },
|
|
322
|
-
{ description: "Get a specific version", command: 'npx @eventcatalog/cli getQuery "GetOrder" "1.0.0"' }
|
|
323
|
-
]
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
name: "getQueries",
|
|
327
|
-
description: "Returns all queries from EventCatalog",
|
|
328
|
-
category: "Queries",
|
|
329
|
-
args: [{ name: "options", type: "json", required: false, description: "Options: {latestOnly?, attachSchema?}" }],
|
|
330
|
-
examples: [
|
|
331
|
-
{ description: "Get all queries", command: "npx @eventcatalog/cli getQueries" },
|
|
332
|
-
{ description: "Get only latest versions", command: `npx @eventcatalog/cli getQueries '{"latestOnly":true}'` }
|
|
333
|
-
]
|
|
334
|
-
},
|
|
335
|
-
{
|
|
336
|
-
name: "writeQuery",
|
|
337
|
-
description: "Writes a query to EventCatalog",
|
|
338
|
-
category: "Queries",
|
|
339
|
-
args: [
|
|
340
|
-
{ name: "query", type: "json", required: true, description: "Query object with id, name, version, and markdown" },
|
|
341
|
-
{ name: "options", type: "json", required: false, description: "Options: {path?, override?, versionExistingContent?}" }
|
|
342
|
-
],
|
|
343
|
-
examples: [
|
|
344
|
-
{
|
|
345
|
-
description: "Write a new query",
|
|
346
|
-
command: `npx @eventcatalog/cli writeQuery '{"id":"GetOrder","name":"Get Order","version":"1.0.0","markdown":"# Get Order"}'`
|
|
347
|
-
}
|
|
348
|
-
]
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
name: "writeQueryToService",
|
|
352
|
-
description: "Writes a query to a specific service",
|
|
353
|
-
category: "Queries",
|
|
354
|
-
args: [
|
|
355
|
-
{ name: "query", type: "json", required: true, description: "Query object" },
|
|
356
|
-
{ name: "service", type: "json", required: true, description: "Service reference: {id, version?}" },
|
|
357
|
-
{ name: "options", type: "json", required: false, description: "Options: {path?, format?, override?}" }
|
|
358
|
-
],
|
|
359
|
-
examples: [
|
|
360
|
-
{
|
|
361
|
-
description: "Write query to a service",
|
|
362
|
-
command: `npx @eventcatalog/cli writeQueryToService '{"id":"GetInventory","name":"Get Inventory","version":"1.0.0","markdown":"# Get Inventory"}' '{"id":"InventoryService"}'`
|
|
363
|
-
}
|
|
364
|
-
]
|
|
365
|
-
},
|
|
366
|
-
{
|
|
367
|
-
name: "rmQuery",
|
|
368
|
-
description: "Removes a query by its path",
|
|
369
|
-
category: "Queries",
|
|
370
|
-
args: [{ name: "path", type: "string", required: true, description: "Path to the query" }],
|
|
371
|
-
examples: [{ description: "Remove a query", command: 'npx @eventcatalog/cli rmQuery "/GetOrder"' }]
|
|
372
|
-
},
|
|
373
|
-
{
|
|
374
|
-
name: "rmQueryById",
|
|
375
|
-
description: "Removes a query by its ID",
|
|
376
|
-
category: "Queries",
|
|
377
|
-
args: [
|
|
378
|
-
{ name: "id", type: "string", required: true, description: "The ID of the query to remove" },
|
|
379
|
-
{ name: "version", type: "string", required: false, description: "Specific version to remove" }
|
|
380
|
-
],
|
|
381
|
-
examples: [{ description: "Remove a query", command: 'npx @eventcatalog/cli rmQueryById "GetOrder"' }]
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
name: "versionQuery",
|
|
385
|
-
description: "Moves the current query to a versioned directory",
|
|
386
|
-
category: "Queries",
|
|
387
|
-
args: [{ name: "id", type: "string", required: true, description: "The ID of the query to version" }],
|
|
388
|
-
examples: [{ description: "Version a query", command: 'npx @eventcatalog/cli versionQuery "GetOrder"' }]
|
|
389
|
-
},
|
|
390
|
-
{
|
|
391
|
-
name: "addFileToQuery",
|
|
392
|
-
description: "Adds a file to a query",
|
|
393
|
-
category: "Queries",
|
|
394
|
-
args: [
|
|
395
|
-
{ name: "id", type: "string", required: true, description: "The ID of the query" },
|
|
396
|
-
{ name: "file", type: "json", required: true, description: "File object: {content, fileName}" },
|
|
397
|
-
{ name: "version", type: "string", required: false, description: "Specific version" }
|
|
398
|
-
],
|
|
399
|
-
examples: [
|
|
400
|
-
{
|
|
401
|
-
description: "Add a file to a query",
|
|
402
|
-
command: `npx @eventcatalog/cli addFileToQuery "GetOrder" '{"content":"# Notes","fileName":"notes.md"}'`
|
|
403
|
-
}
|
|
404
|
-
]
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
name: "addSchemaToQuery",
|
|
408
|
-
description: "Adds a schema to a query",
|
|
409
|
-
category: "Queries",
|
|
410
|
-
args: [
|
|
411
|
-
{ name: "id", type: "string", required: true, description: "The ID of the query" },
|
|
412
|
-
{ name: "schema", type: "json", required: true, description: "Schema object: {schema, fileName}" },
|
|
413
|
-
{ name: "version", type: "string", required: false, description: "Specific version" }
|
|
414
|
-
],
|
|
415
|
-
examples: [
|
|
416
|
-
{
|
|
417
|
-
description: "Add a schema to a query",
|
|
418
|
-
command: `npx @eventcatalog/cli addSchemaToQuery "GetOrder" '{"schema":"{\\"type\\":\\"object\\"}","fileName":"schema.json"}'`
|
|
419
|
-
}
|
|
420
|
-
]
|
|
421
|
-
},
|
|
422
|
-
{
|
|
423
|
-
name: "queryHasVersion",
|
|
424
|
-
description: "Checks if a specific version of a query exists",
|
|
425
|
-
category: "Queries",
|
|
426
|
-
args: [
|
|
427
|
-
{ name: "id", type: "string", required: true, description: "The ID of the query" },
|
|
428
|
-
{ name: "version", type: "string", required: true, description: "Version to check" }
|
|
429
|
-
],
|
|
430
|
-
examples: [{ description: "Check if version exists", command: 'npx @eventcatalog/cli queryHasVersion "GetOrder" "1.0.0"' }]
|
|
431
|
-
},
|
|
432
|
-
// ================================
|
|
433
|
-
// Services
|
|
434
|
-
// ================================
|
|
435
|
-
{
|
|
436
|
-
name: "getService",
|
|
437
|
-
description: "Returns a service from EventCatalog by its ID",
|
|
438
|
-
category: "Services",
|
|
439
|
-
args: [
|
|
440
|
-
{ name: "id", type: "string", required: true, description: "The ID of the service to retrieve" },
|
|
441
|
-
{ name: "version", type: "string", required: false, description: "Specific version to retrieve" }
|
|
442
|
-
],
|
|
443
|
-
examples: [
|
|
444
|
-
{ description: "Get the latest service", command: 'npx @eventcatalog/cli getService "OrderService"' },
|
|
445
|
-
{ description: "Get a specific version", command: 'npx @eventcatalog/cli getService "OrderService" "1.0.0"' }
|
|
446
|
-
]
|
|
447
|
-
},
|
|
448
|
-
{
|
|
449
|
-
name: "getServices",
|
|
450
|
-
description: "Returns all services from EventCatalog",
|
|
451
|
-
category: "Services",
|
|
452
|
-
args: [{ name: "options", type: "json", required: false, description: "Options: {latestOnly?}" }],
|
|
453
|
-
examples: [
|
|
454
|
-
{ description: "Get all services", command: "npx @eventcatalog/cli getServices" },
|
|
455
|
-
{ description: "Get only latest versions", command: `npx @eventcatalog/cli getServices '{"latestOnly":true}'` }
|
|
456
|
-
]
|
|
457
|
-
},
|
|
458
|
-
{
|
|
459
|
-
name: "writeService",
|
|
460
|
-
description: "Writes a service to EventCatalog",
|
|
461
|
-
category: "Services",
|
|
462
|
-
args: [
|
|
463
|
-
{ name: "service", type: "json", required: true, description: "Service object with id, name, version, and markdown" },
|
|
464
|
-
{ name: "options", type: "json", required: false, description: "Options: {path?, override?, versionExistingContent?}" }
|
|
465
|
-
],
|
|
466
|
-
examples: [
|
|
467
|
-
{
|
|
468
|
-
description: "Write a new service",
|
|
469
|
-
command: `npx @eventcatalog/cli writeService '{"id":"OrderService","name":"Order Service","version":"1.0.0","markdown":"# Order Service"}'`
|
|
470
|
-
}
|
|
471
|
-
]
|
|
472
|
-
},
|
|
473
|
-
{
|
|
474
|
-
name: "writeServiceToDomain",
|
|
475
|
-
description: "Writes a service to a specific domain",
|
|
476
|
-
category: "Services",
|
|
477
|
-
args: [
|
|
478
|
-
{ name: "service", type: "json", required: true, description: "Service object" },
|
|
479
|
-
{ name: "domain", type: "json", required: true, description: "Domain reference: {id, version?}" },
|
|
480
|
-
{ name: "options", type: "json", required: false, description: "Options" }
|
|
481
|
-
],
|
|
482
|
-
examples: [
|
|
483
|
-
{
|
|
484
|
-
description: "Write service to a domain",
|
|
485
|
-
command: `npx @eventcatalog/cli writeServiceToDomain '{"id":"PaymentService","name":"Payment Service","version":"1.0.0","markdown":"# Payment Service"}' '{"id":"Payments"}'`
|
|
486
|
-
}
|
|
487
|
-
]
|
|
488
|
-
},
|
|
489
|
-
{
|
|
490
|
-
name: "rmService",
|
|
491
|
-
description: "Removes a service by its path",
|
|
492
|
-
category: "Services",
|
|
493
|
-
args: [{ name: "path", type: "string", required: true, description: "Path to the service" }],
|
|
494
|
-
examples: [{ description: "Remove a service", command: 'npx @eventcatalog/cli rmService "/OrderService"' }]
|
|
495
|
-
},
|
|
496
|
-
{
|
|
497
|
-
name: "rmServiceById",
|
|
498
|
-
description: "Removes a service by its ID",
|
|
499
|
-
category: "Services",
|
|
500
|
-
args: [
|
|
501
|
-
{ name: "id", type: "string", required: true, description: "The ID of the service to remove" },
|
|
502
|
-
{ name: "version", type: "string", required: false, description: "Specific version to remove" }
|
|
503
|
-
],
|
|
504
|
-
examples: [{ description: "Remove a service", command: 'npx @eventcatalog/cli rmServiceById "OrderService"' }]
|
|
505
|
-
},
|
|
506
|
-
{
|
|
507
|
-
name: "versionService",
|
|
508
|
-
description: "Moves the current service to a versioned directory",
|
|
509
|
-
category: "Services",
|
|
510
|
-
args: [{ name: "id", type: "string", required: true, description: "The ID of the service to version" }],
|
|
511
|
-
examples: [{ description: "Version a service", command: 'npx @eventcatalog/cli versionService "OrderService"' }]
|
|
512
|
-
},
|
|
513
|
-
{
|
|
514
|
-
name: "addFileToService",
|
|
515
|
-
description: "Adds a file to a service",
|
|
516
|
-
category: "Services",
|
|
517
|
-
args: [
|
|
518
|
-
{ name: "id", type: "string", required: true, description: "The ID of the service" },
|
|
519
|
-
{ name: "file", type: "json", required: true, description: "File object: {content, fileName}" },
|
|
520
|
-
{ name: "version", type: "string", required: false, description: "Specific version" }
|
|
521
|
-
],
|
|
522
|
-
examples: [
|
|
523
|
-
{
|
|
524
|
-
description: "Add a file to a service",
|
|
525
|
-
command: `npx @eventcatalog/cli addFileToService "OrderService" '{"content":"# API Docs","fileName":"api.md"}'`
|
|
526
|
-
}
|
|
527
|
-
]
|
|
528
|
-
},
|
|
529
|
-
{
|
|
530
|
-
name: "addEventToService",
|
|
531
|
-
description: "Adds an event relationship to a service",
|
|
532
|
-
category: "Services",
|
|
533
|
-
args: [
|
|
534
|
-
{ name: "serviceId", type: "string", required: true, description: "The ID of the service" },
|
|
535
|
-
{ name: "direction", type: "string", required: true, description: 'Direction: "sends" or "receives"' },
|
|
536
|
-
{ name: "event", type: "json", required: true, description: "Event reference: {id, version}" },
|
|
537
|
-
{ name: "serviceVersion", type: "string", required: false, description: "Specific service version" }
|
|
538
|
-
],
|
|
539
|
-
examples: [
|
|
540
|
-
{
|
|
541
|
-
description: "Add event that service sends",
|
|
542
|
-
command: `npx @eventcatalog/cli addEventToService "OrderService" "sends" '{"id":"OrderCreated","version":"1.0.0"}'`
|
|
543
|
-
},
|
|
544
|
-
{
|
|
545
|
-
description: "Add event that service receives",
|
|
546
|
-
command: `npx @eventcatalog/cli addEventToService "OrderService" "receives" '{"id":"PaymentCompleted","version":"1.0.0"}'`
|
|
547
|
-
}
|
|
548
|
-
]
|
|
549
|
-
},
|
|
550
|
-
{
|
|
551
|
-
name: "addCommandToService",
|
|
552
|
-
description: "Adds a command relationship to a service",
|
|
553
|
-
category: "Services",
|
|
554
|
-
args: [
|
|
555
|
-
{ name: "serviceId", type: "string", required: true, description: "The ID of the service" },
|
|
556
|
-
{ name: "direction", type: "string", required: true, description: 'Direction: "sends" or "receives"' },
|
|
557
|
-
{ name: "command", type: "json", required: true, description: "Command reference: {id, version}" },
|
|
558
|
-
{ name: "serviceVersion", type: "string", required: false, description: "Specific service version" }
|
|
559
|
-
],
|
|
560
|
-
examples: [
|
|
561
|
-
{
|
|
562
|
-
description: "Add command that service sends",
|
|
563
|
-
command: `npx @eventcatalog/cli addCommandToService "OrderService" "sends" '{"id":"ProcessPayment","version":"1.0.0"}'`
|
|
564
|
-
}
|
|
565
|
-
]
|
|
566
|
-
},
|
|
567
|
-
{
|
|
568
|
-
name: "addQueryToService",
|
|
569
|
-
description: "Adds a query relationship to a service",
|
|
570
|
-
category: "Services",
|
|
571
|
-
args: [
|
|
572
|
-
{ name: "serviceId", type: "string", required: true, description: "The ID of the service" },
|
|
573
|
-
{ name: "direction", type: "string", required: true, description: 'Direction: "sends" or "receives"' },
|
|
574
|
-
{ name: "query", type: "json", required: true, description: "Query reference: {id, version}" },
|
|
575
|
-
{ name: "serviceVersion", type: "string", required: false, description: "Specific service version" }
|
|
576
|
-
],
|
|
577
|
-
examples: [
|
|
578
|
-
{
|
|
579
|
-
description: "Add query that service sends",
|
|
580
|
-
command: `npx @eventcatalog/cli addQueryToService "OrderService" "sends" '{"id":"GetInventory","version":"1.0.0"}'`
|
|
581
|
-
}
|
|
582
|
-
]
|
|
583
|
-
},
|
|
584
|
-
{
|
|
585
|
-
name: "addEntityToService",
|
|
586
|
-
description: "Adds an entity to a service",
|
|
587
|
-
category: "Services",
|
|
588
|
-
args: [
|
|
589
|
-
{ name: "serviceId", type: "string", required: true, description: "The ID of the service" },
|
|
590
|
-
{ name: "entity", type: "json", required: true, description: "Entity reference: {id, version}" },
|
|
591
|
-
{ name: "serviceVersion", type: "string", required: false, description: "Specific service version" }
|
|
592
|
-
],
|
|
593
|
-
examples: [
|
|
594
|
-
{
|
|
595
|
-
description: "Add entity to a service",
|
|
596
|
-
command: `npx @eventcatalog/cli addEntityToService "OrderService" '{"id":"Order","version":"1.0.0"}'`
|
|
597
|
-
}
|
|
598
|
-
]
|
|
599
|
-
},
|
|
600
|
-
{
|
|
601
|
-
name: "addDataStoreToService",
|
|
602
|
-
description: "Adds a data store relationship to a service",
|
|
603
|
-
category: "Services",
|
|
604
|
-
args: [
|
|
605
|
-
{ name: "serviceId", type: "string", required: true, description: "The ID of the service" },
|
|
606
|
-
{ name: "relationship", type: "string", required: true, description: 'Relationship: "writesTo" or "readsFrom"' },
|
|
607
|
-
{ name: "dataStore", type: "json", required: true, description: "Data store reference: {id, version}" },
|
|
608
|
-
{ name: "serviceVersion", type: "string", required: false, description: "Specific service version" }
|
|
609
|
-
],
|
|
610
|
-
examples: [
|
|
611
|
-
{
|
|
612
|
-
description: "Add data store that service writes to",
|
|
613
|
-
command: `npx @eventcatalog/cli addDataStoreToService "OrderService" "writesTo" '{"id":"orders-db","version":"1.0.0"}'`
|
|
614
|
-
}
|
|
615
|
-
]
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
name: "serviceHasVersion",
|
|
619
|
-
description: "Checks if a specific version of a service exists",
|
|
620
|
-
category: "Services",
|
|
621
|
-
args: [
|
|
622
|
-
{ name: "id", type: "string", required: true, description: "The ID of the service" },
|
|
623
|
-
{ name: "version", type: "string", required: true, description: "Version to check" }
|
|
624
|
-
],
|
|
625
|
-
examples: [
|
|
626
|
-
{ description: "Check if version exists", command: 'npx @eventcatalog/cli serviceHasVersion "OrderService" "1.0.0"' }
|
|
627
|
-
]
|
|
628
|
-
},
|
|
629
|
-
{
|
|
630
|
-
name: "getSpecificationFilesForService",
|
|
631
|
-
description: "Returns specification files (OpenAPI, AsyncAPI) for a service",
|
|
632
|
-
category: "Services",
|
|
633
|
-
args: [
|
|
634
|
-
{ name: "id", type: "string", required: true, description: "The ID of the service" },
|
|
635
|
-
{ name: "version", type: "string", required: false, description: "Specific version" }
|
|
636
|
-
],
|
|
637
|
-
examples: [
|
|
638
|
-
{ description: "Get spec files", command: 'npx @eventcatalog/cli getSpecificationFilesForService "OrderService"' }
|
|
639
|
-
]
|
|
640
|
-
},
|
|
641
|
-
// ================================
|
|
642
|
-
// Domains
|
|
643
|
-
// ================================
|
|
644
|
-
{
|
|
645
|
-
name: "getDomain",
|
|
646
|
-
description: "Returns a domain from EventCatalog by its ID",
|
|
647
|
-
category: "Domains",
|
|
648
|
-
args: [
|
|
649
|
-
{ name: "id", type: "string", required: true, description: "The ID of the domain to retrieve" },
|
|
650
|
-
{ name: "version", type: "string", required: false, description: "Specific version to retrieve" }
|
|
651
|
-
],
|
|
652
|
-
examples: [
|
|
653
|
-
{ description: "Get the latest domain", command: 'npx @eventcatalog/cli getDomain "Orders"' },
|
|
654
|
-
{ description: "Get a specific version", command: 'npx @eventcatalog/cli getDomain "Orders" "1.0.0"' }
|
|
655
|
-
]
|
|
656
|
-
},
|
|
657
|
-
{
|
|
658
|
-
name: "getDomains",
|
|
659
|
-
description: "Returns all domains from EventCatalog",
|
|
660
|
-
category: "Domains",
|
|
661
|
-
args: [{ name: "options", type: "json", required: false, description: "Options: {latestOnly?}" }],
|
|
662
|
-
examples: [
|
|
663
|
-
{ description: "Get all domains", command: "npx @eventcatalog/cli getDomains" },
|
|
664
|
-
{ description: "Get only latest versions", command: `npx @eventcatalog/cli getDomains '{"latestOnly":true}'` }
|
|
665
|
-
]
|
|
666
|
-
},
|
|
667
|
-
{
|
|
668
|
-
name: "writeDomain",
|
|
669
|
-
description: "Writes a domain to EventCatalog",
|
|
670
|
-
category: "Domains",
|
|
671
|
-
args: [
|
|
672
|
-
{ name: "domain", type: "json", required: true, description: "Domain object with id, name, version, and markdown" },
|
|
673
|
-
{ name: "options", type: "json", required: false, description: "Options: {path?, override?, versionExistingContent?}" }
|
|
674
|
-
],
|
|
675
|
-
examples: [
|
|
676
|
-
{
|
|
677
|
-
description: "Write a new domain",
|
|
678
|
-
command: `npx @eventcatalog/cli writeDomain '{"id":"Orders","name":"Orders Domain","version":"1.0.0","markdown":"# Orders Domain"}'`
|
|
679
|
-
}
|
|
680
|
-
]
|
|
681
|
-
},
|
|
682
|
-
{
|
|
683
|
-
name: "rmDomain",
|
|
684
|
-
description: "Removes a domain by its path",
|
|
685
|
-
category: "Domains",
|
|
686
|
-
args: [{ name: "path", type: "string", required: true, description: "Path to the domain" }],
|
|
687
|
-
examples: [{ description: "Remove a domain", command: 'npx @eventcatalog/cli rmDomain "/Orders"' }]
|
|
688
|
-
},
|
|
689
|
-
{
|
|
690
|
-
name: "rmDomainById",
|
|
691
|
-
description: "Removes a domain by its ID",
|
|
692
|
-
category: "Domains",
|
|
693
|
-
args: [
|
|
694
|
-
{ name: "id", type: "string", required: true, description: "The ID of the domain to remove" },
|
|
695
|
-
{ name: "version", type: "string", required: false, description: "Specific version to remove" }
|
|
696
|
-
],
|
|
697
|
-
examples: [{ description: "Remove a domain", command: 'npx @eventcatalog/cli rmDomainById "Orders"' }]
|
|
698
|
-
},
|
|
699
|
-
{
|
|
700
|
-
name: "versionDomain",
|
|
701
|
-
description: "Moves the current domain to a versioned directory",
|
|
702
|
-
category: "Domains",
|
|
703
|
-
args: [{ name: "id", type: "string", required: true, description: "The ID of the domain to version" }],
|
|
704
|
-
examples: [{ description: "Version a domain", command: 'npx @eventcatalog/cli versionDomain "Orders"' }]
|
|
705
|
-
},
|
|
706
|
-
{
|
|
707
|
-
name: "addFileToDomain",
|
|
708
|
-
description: "Adds a file to a domain",
|
|
709
|
-
category: "Domains",
|
|
710
|
-
args: [
|
|
711
|
-
{ name: "id", type: "string", required: true, description: "The ID of the domain" },
|
|
712
|
-
{ name: "file", type: "json", required: true, description: "File object: {content, fileName}" },
|
|
713
|
-
{ name: "version", type: "string", required: false, description: "Specific version" }
|
|
714
|
-
],
|
|
715
|
-
examples: [
|
|
716
|
-
{
|
|
717
|
-
description: "Add a file to a domain",
|
|
718
|
-
command: `npx @eventcatalog/cli addFileToDomain "Orders" '{"content":"# Overview","fileName":"overview.md"}'`
|
|
719
|
-
}
|
|
720
|
-
]
|
|
721
|
-
},
|
|
722
|
-
{
|
|
723
|
-
name: "addServiceToDomain",
|
|
724
|
-
description: "Adds a service to a domain",
|
|
725
|
-
category: "Domains",
|
|
726
|
-
args: [
|
|
727
|
-
{ name: "domainId", type: "string", required: true, description: "The ID of the domain" },
|
|
728
|
-
{ name: "service", type: "json", required: true, description: "Service reference: {id, version}" },
|
|
729
|
-
{ name: "domainVersion", type: "string", required: false, description: "Specific domain version" }
|
|
730
|
-
],
|
|
731
|
-
examples: [
|
|
732
|
-
{
|
|
733
|
-
description: "Add service to domain",
|
|
734
|
-
command: `npx @eventcatalog/cli addServiceToDomain "Orders" '{"id":"OrderService","version":"1.0.0"}'`
|
|
735
|
-
}
|
|
736
|
-
]
|
|
737
|
-
},
|
|
738
|
-
{
|
|
739
|
-
name: "addSubDomainToDomain",
|
|
740
|
-
description: "Adds a subdomain to a domain",
|
|
741
|
-
category: "Domains",
|
|
742
|
-
args: [
|
|
743
|
-
{ name: "domainId", type: "string", required: true, description: "The ID of the parent domain" },
|
|
744
|
-
{ name: "subDomain", type: "json", required: true, description: "Subdomain reference: {id, version}" },
|
|
745
|
-
{ name: "domainVersion", type: "string", required: false, description: "Specific domain version" }
|
|
746
|
-
],
|
|
747
|
-
examples: [
|
|
748
|
-
{
|
|
749
|
-
description: "Add subdomain",
|
|
750
|
-
command: `npx @eventcatalog/cli addSubDomainToDomain "Orders" '{"id":"Fulfillment","version":"1.0.0"}'`
|
|
751
|
-
}
|
|
752
|
-
]
|
|
753
|
-
},
|
|
754
|
-
{
|
|
755
|
-
name: "addEntityToDomain",
|
|
756
|
-
description: "Adds an entity to a domain",
|
|
757
|
-
category: "Domains",
|
|
758
|
-
args: [
|
|
759
|
-
{ name: "domainId", type: "string", required: true, description: "The ID of the domain" },
|
|
760
|
-
{ name: "entity", type: "json", required: true, description: "Entity reference: {id, version}" },
|
|
761
|
-
{ name: "domainVersion", type: "string", required: false, description: "Specific domain version" }
|
|
762
|
-
],
|
|
763
|
-
examples: [
|
|
764
|
-
{
|
|
765
|
-
description: "Add entity to domain",
|
|
766
|
-
command: `npx @eventcatalog/cli addEntityToDomain "Orders" '{"id":"Order","version":"1.0.0"}'`
|
|
767
|
-
}
|
|
768
|
-
]
|
|
769
|
-
},
|
|
770
|
-
{
|
|
771
|
-
name: "addEventToDomain",
|
|
772
|
-
description: "Adds an event relationship to a domain",
|
|
773
|
-
category: "Domains",
|
|
774
|
-
args: [
|
|
775
|
-
{ name: "domainId", type: "string", required: true, description: "The ID of the domain" },
|
|
776
|
-
{ name: "direction", type: "string", required: true, description: 'Direction: "sends" or "receives"' },
|
|
777
|
-
{ name: "event", type: "json", required: true, description: "Event reference: {id, version}" },
|
|
778
|
-
{ name: "domainVersion", type: "string", required: false, description: "Specific domain version" }
|
|
779
|
-
],
|
|
780
|
-
examples: [
|
|
781
|
-
{
|
|
782
|
-
description: "Add event that domain sends",
|
|
783
|
-
command: `npx @eventcatalog/cli addEventToDomain "Orders" "sends" '{"id":"OrderCreated","version":"1.0.0"}'`
|
|
784
|
-
}
|
|
785
|
-
]
|
|
786
|
-
},
|
|
787
|
-
{
|
|
788
|
-
name: "addCommandToDomain",
|
|
789
|
-
description: "Adds a command relationship to a domain",
|
|
790
|
-
category: "Domains",
|
|
791
|
-
args: [
|
|
792
|
-
{ name: "domainId", type: "string", required: true, description: "The ID of the domain" },
|
|
793
|
-
{ name: "direction", type: "string", required: true, description: 'Direction: "sends" or "receives"' },
|
|
794
|
-
{ name: "command", type: "json", required: true, description: "Command reference: {id, version}" },
|
|
795
|
-
{ name: "domainVersion", type: "string", required: false, description: "Specific domain version" }
|
|
796
|
-
],
|
|
797
|
-
examples: [
|
|
798
|
-
{
|
|
799
|
-
description: "Add command that domain sends",
|
|
800
|
-
command: `npx @eventcatalog/cli addCommandToDomain "Orders" "sends" '{"id":"ProcessOrder","version":"1.0.0"}'`
|
|
801
|
-
}
|
|
802
|
-
]
|
|
803
|
-
},
|
|
804
|
-
{
|
|
805
|
-
name: "addQueryToDomain",
|
|
806
|
-
description: "Adds a query relationship to a domain",
|
|
807
|
-
category: "Domains",
|
|
808
|
-
args: [
|
|
809
|
-
{ name: "domainId", type: "string", required: true, description: "The ID of the domain" },
|
|
810
|
-
{ name: "direction", type: "string", required: true, description: 'Direction: "sends" or "receives"' },
|
|
811
|
-
{ name: "query", type: "json", required: true, description: "Query reference: {id, version}" },
|
|
812
|
-
{ name: "domainVersion", type: "string", required: false, description: "Specific domain version" }
|
|
813
|
-
],
|
|
814
|
-
examples: [
|
|
815
|
-
{
|
|
816
|
-
description: "Add query that domain sends",
|
|
817
|
-
command: `npx @eventcatalog/cli addQueryToDomain "Orders" "sends" '{"id":"GetOrderStatus","version":"1.0.0"}'`
|
|
818
|
-
}
|
|
819
|
-
]
|
|
820
|
-
},
|
|
821
|
-
{
|
|
822
|
-
name: "addUbiquitousLanguageToDomain",
|
|
823
|
-
description: "Adds ubiquitous language definitions to a domain",
|
|
824
|
-
category: "Domains",
|
|
825
|
-
args: [
|
|
826
|
-
{ name: "domainId", type: "string", required: true, description: "The ID of the domain" },
|
|
827
|
-
{ name: "dictionary", type: "json", required: true, description: "Array of {term, definition} objects" },
|
|
828
|
-
{ name: "domainVersion", type: "string", required: false, description: "Specific domain version" }
|
|
829
|
-
],
|
|
830
|
-
examples: [
|
|
831
|
-
{
|
|
832
|
-
description: "Add ubiquitous language",
|
|
833
|
-
command: `npx @eventcatalog/cli addUbiquitousLanguageToDomain "Orders" '[{"term":"Order","definition":"A customer purchase request"}]'`
|
|
834
|
-
}
|
|
835
|
-
]
|
|
836
|
-
},
|
|
837
|
-
{
|
|
838
|
-
name: "getUbiquitousLanguageFromDomain",
|
|
839
|
-
description: "Gets ubiquitous language definitions from a domain",
|
|
840
|
-
category: "Domains",
|
|
841
|
-
args: [
|
|
842
|
-
{ name: "domainId", type: "string", required: true, description: "The ID of the domain" },
|
|
843
|
-
{ name: "domainVersion", type: "string", required: false, description: "Specific domain version" }
|
|
844
|
-
],
|
|
845
|
-
examples: [
|
|
846
|
-
{ description: "Get ubiquitous language", command: 'npx @eventcatalog/cli getUbiquitousLanguageFromDomain "Orders"' }
|
|
847
|
-
]
|
|
848
|
-
},
|
|
849
|
-
{
|
|
850
|
-
name: "domainHasVersion",
|
|
851
|
-
description: "Checks if a specific version of a domain exists",
|
|
852
|
-
category: "Domains",
|
|
853
|
-
args: [
|
|
854
|
-
{ name: "id", type: "string", required: true, description: "The ID of the domain" },
|
|
855
|
-
{ name: "version", type: "string", required: true, description: "Version to check" }
|
|
856
|
-
],
|
|
857
|
-
examples: [{ description: "Check if version exists", command: 'npx @eventcatalog/cli domainHasVersion "Orders" "1.0.0"' }]
|
|
858
|
-
},
|
|
859
|
-
// ================================
|
|
860
|
-
// Channels
|
|
861
|
-
// ================================
|
|
862
|
-
{
|
|
863
|
-
name: "getChannel",
|
|
864
|
-
description: "Returns a channel from EventCatalog by its ID",
|
|
865
|
-
category: "Channels",
|
|
866
|
-
args: [
|
|
867
|
-
{ name: "id", type: "string", required: true, description: "The ID of the channel to retrieve" },
|
|
868
|
-
{ name: "version", type: "string", required: false, description: "Specific version to retrieve" }
|
|
869
|
-
],
|
|
870
|
-
examples: [
|
|
871
|
-
{ description: "Get the latest channel", command: 'npx @eventcatalog/cli getChannel "orders.events"' },
|
|
872
|
-
{ description: "Get a specific version", command: 'npx @eventcatalog/cli getChannel "orders.events" "1.0.0"' }
|
|
873
|
-
]
|
|
874
|
-
},
|
|
875
|
-
{
|
|
876
|
-
name: "getChannels",
|
|
877
|
-
description: "Returns all channels from EventCatalog",
|
|
878
|
-
category: "Channels",
|
|
879
|
-
args: [{ name: "options", type: "json", required: false, description: "Options: {latestOnly?}" }],
|
|
880
|
-
examples: [
|
|
881
|
-
{ description: "Get all channels", command: "npx @eventcatalog/cli getChannels" },
|
|
882
|
-
{ description: "Get only latest versions", command: `npx @eventcatalog/cli getChannels '{"latestOnly":true}'` }
|
|
883
|
-
]
|
|
884
|
-
},
|
|
885
|
-
{
|
|
886
|
-
name: "writeChannel",
|
|
887
|
-
description: "Writes a channel to EventCatalog",
|
|
888
|
-
category: "Channels",
|
|
889
|
-
args: [
|
|
890
|
-
{ name: "channel", type: "json", required: true, description: "Channel object with id, name, version, and markdown" },
|
|
891
|
-
{ name: "options", type: "json", required: false, description: "Options: {path?, override?}" }
|
|
892
|
-
],
|
|
893
|
-
examples: [
|
|
894
|
-
{
|
|
895
|
-
description: "Write a new channel",
|
|
896
|
-
command: `npx @eventcatalog/cli writeChannel '{"id":"orders.events","name":"Orders Events","version":"1.0.0","markdown":"# Orders Events Channel"}'`
|
|
897
|
-
}
|
|
898
|
-
]
|
|
899
|
-
},
|
|
900
|
-
{
|
|
901
|
-
name: "rmChannel",
|
|
902
|
-
description: "Removes a channel by its path",
|
|
903
|
-
category: "Channels",
|
|
904
|
-
args: [{ name: "path", type: "string", required: true, description: "Path to the channel" }],
|
|
905
|
-
examples: [{ description: "Remove a channel", command: 'npx @eventcatalog/cli rmChannel "/orders.events"' }]
|
|
906
|
-
},
|
|
907
|
-
{
|
|
908
|
-
name: "rmChannelById",
|
|
909
|
-
description: "Removes a channel by its ID",
|
|
910
|
-
category: "Channels",
|
|
911
|
-
args: [
|
|
912
|
-
{ name: "id", type: "string", required: true, description: "The ID of the channel to remove" },
|
|
913
|
-
{ name: "version", type: "string", required: false, description: "Specific version to remove" }
|
|
914
|
-
],
|
|
915
|
-
examples: [{ description: "Remove a channel", command: 'npx @eventcatalog/cli rmChannelById "orders.events"' }]
|
|
916
|
-
},
|
|
917
|
-
{
|
|
918
|
-
name: "versionChannel",
|
|
919
|
-
description: "Moves the current channel to a versioned directory",
|
|
920
|
-
category: "Channels",
|
|
921
|
-
args: [{ name: "id", type: "string", required: true, description: "The ID of the channel to version" }],
|
|
922
|
-
examples: [{ description: "Version a channel", command: 'npx @eventcatalog/cli versionChannel "orders.events"' }]
|
|
923
|
-
},
|
|
924
|
-
{
|
|
925
|
-
name: "addEventToChannel",
|
|
926
|
-
description: "Adds an event to a channel",
|
|
927
|
-
category: "Channels",
|
|
928
|
-
args: [
|
|
929
|
-
{ name: "channelId", type: "string", required: true, description: "The ID of the channel" },
|
|
930
|
-
{ name: "event", type: "json", required: true, description: "Event reference: {id, version, parameters?}" }
|
|
931
|
-
],
|
|
932
|
-
examples: [
|
|
933
|
-
{
|
|
934
|
-
description: "Add event to channel",
|
|
935
|
-
command: `npx @eventcatalog/cli addEventToChannel "orders.events" '{"id":"OrderCreated","version":"1.0.0"}'`
|
|
936
|
-
}
|
|
937
|
-
]
|
|
938
|
-
},
|
|
939
|
-
{
|
|
940
|
-
name: "addCommandToChannel",
|
|
941
|
-
description: "Adds a command to a channel",
|
|
942
|
-
category: "Channels",
|
|
943
|
-
args: [
|
|
944
|
-
{ name: "channelId", type: "string", required: true, description: "The ID of the channel" },
|
|
945
|
-
{ name: "command", type: "json", required: true, description: "Command reference: {id, version, parameters?}" }
|
|
946
|
-
],
|
|
947
|
-
examples: [
|
|
948
|
-
{
|
|
949
|
-
description: "Add command to channel",
|
|
950
|
-
command: `npx @eventcatalog/cli addCommandToChannel "orders.commands" '{"id":"CreateOrder","version":"1.0.0"}'`
|
|
951
|
-
}
|
|
952
|
-
]
|
|
953
|
-
},
|
|
954
|
-
{
|
|
955
|
-
name: "addQueryToChannel",
|
|
956
|
-
description: "Adds a query to a channel",
|
|
957
|
-
category: "Channels",
|
|
958
|
-
args: [
|
|
959
|
-
{ name: "channelId", type: "string", required: true, description: "The ID of the channel" },
|
|
960
|
-
{ name: "query", type: "json", required: true, description: "Query reference: {id, version, parameters?}" }
|
|
961
|
-
],
|
|
962
|
-
examples: [
|
|
963
|
-
{
|
|
964
|
-
description: "Add query to channel",
|
|
965
|
-
command: `npx @eventcatalog/cli addQueryToChannel "orders.queries" '{"id":"GetOrder","version":"1.0.0"}'`
|
|
966
|
-
}
|
|
967
|
-
]
|
|
968
|
-
},
|
|
969
|
-
{
|
|
970
|
-
name: "channelHasVersion",
|
|
971
|
-
description: "Checks if a specific version of a channel exists",
|
|
972
|
-
category: "Channels",
|
|
973
|
-
args: [
|
|
974
|
-
{ name: "id", type: "string", required: true, description: "The ID of the channel" },
|
|
975
|
-
{ name: "version", type: "string", required: true, description: "Version to check" }
|
|
976
|
-
],
|
|
977
|
-
examples: [
|
|
978
|
-
{ description: "Check if version exists", command: 'npx @eventcatalog/cli channelHasVersion "orders.events" "1.0.0"' }
|
|
979
|
-
]
|
|
980
|
-
},
|
|
981
|
-
// ================================
|
|
982
|
-
// Teams
|
|
983
|
-
// ================================
|
|
984
|
-
{
|
|
985
|
-
name: "getTeam",
|
|
986
|
-
description: "Returns a team from EventCatalog by its ID",
|
|
987
|
-
category: "Teams",
|
|
988
|
-
args: [{ name: "id", type: "string", required: true, description: "The ID of the team to retrieve" }],
|
|
989
|
-
examples: [{ description: "Get a team", command: 'npx @eventcatalog/cli getTeam "platform-team"' }]
|
|
990
|
-
},
|
|
991
|
-
{
|
|
992
|
-
name: "getTeams",
|
|
993
|
-
description: "Returns all teams from EventCatalog",
|
|
994
|
-
category: "Teams",
|
|
995
|
-
args: [],
|
|
996
|
-
examples: [{ description: "Get all teams", command: "npx @eventcatalog/cli getTeams" }]
|
|
997
|
-
},
|
|
998
|
-
{
|
|
999
|
-
name: "writeTeam",
|
|
1000
|
-
description: "Writes a team to EventCatalog",
|
|
1001
|
-
category: "Teams",
|
|
1002
|
-
args: [
|
|
1003
|
-
{ name: "team", type: "json", required: true, description: "Team object with id, name, and markdown" },
|
|
1004
|
-
{ name: "options", type: "json", required: false, description: "Options: {path?, override?}" }
|
|
1005
|
-
],
|
|
1006
|
-
examples: [
|
|
1007
|
-
{
|
|
1008
|
-
description: "Write a new team",
|
|
1009
|
-
command: `npx @eventcatalog/cli writeTeam '{"id":"platform-team","name":"Platform Team","markdown":"# Platform Team"}'`
|
|
1010
|
-
}
|
|
1011
|
-
]
|
|
1012
|
-
},
|
|
1013
|
-
{
|
|
1014
|
-
name: "rmTeamById",
|
|
1015
|
-
description: "Removes a team by its ID",
|
|
1016
|
-
category: "Teams",
|
|
1017
|
-
args: [{ name: "id", type: "string", required: true, description: "The ID of the team to remove" }],
|
|
1018
|
-
examples: [{ description: "Remove a team", command: 'npx @eventcatalog/cli rmTeamById "platform-team"' }]
|
|
1019
|
-
},
|
|
1020
|
-
// ================================
|
|
1021
|
-
// Users
|
|
1022
|
-
// ================================
|
|
1023
|
-
{
|
|
1024
|
-
name: "getUser",
|
|
1025
|
-
description: "Returns a user from EventCatalog by their ID",
|
|
1026
|
-
category: "Users",
|
|
1027
|
-
args: [{ name: "id", type: "string", required: true, description: "The ID of the user to retrieve" }],
|
|
1028
|
-
examples: [{ description: "Get a user", command: 'npx @eventcatalog/cli getUser "jsmith"' }]
|
|
1029
|
-
},
|
|
1030
|
-
{
|
|
1031
|
-
name: "getUsers",
|
|
1032
|
-
description: "Returns all users from EventCatalog",
|
|
1033
|
-
category: "Users",
|
|
1034
|
-
args: [],
|
|
1035
|
-
examples: [{ description: "Get all users", command: "npx @eventcatalog/cli getUsers" }]
|
|
1036
|
-
},
|
|
1037
|
-
{
|
|
1038
|
-
name: "writeUser",
|
|
1039
|
-
description: "Writes a user to EventCatalog",
|
|
1040
|
-
category: "Users",
|
|
1041
|
-
args: [
|
|
1042
|
-
{ name: "user", type: "json", required: true, description: "User object with id, name, and markdown" },
|
|
1043
|
-
{ name: "options", type: "json", required: false, description: "Options: {path?, override?}" }
|
|
1044
|
-
],
|
|
1045
|
-
examples: [
|
|
1046
|
-
{
|
|
1047
|
-
description: "Write a new user",
|
|
1048
|
-
command: `npx @eventcatalog/cli writeUser '{"id":"jsmith","name":"John Smith","markdown":"# John Smith"}'`
|
|
1049
|
-
}
|
|
1050
|
-
]
|
|
1051
|
-
},
|
|
1052
|
-
{
|
|
1053
|
-
name: "rmUserById",
|
|
1054
|
-
description: "Removes a user by their ID",
|
|
1055
|
-
category: "Users",
|
|
1056
|
-
args: [{ name: "id", type: "string", required: true, description: "The ID of the user to remove" }],
|
|
1057
|
-
examples: [{ description: "Remove a user", command: 'npx @eventcatalog/cli rmUserById "jsmith"' }]
|
|
1058
|
-
},
|
|
1059
|
-
// ================================
|
|
1060
|
-
// Custom Docs
|
|
1061
|
-
// ================================
|
|
1062
|
-
{
|
|
1063
|
-
name: "getCustomDoc",
|
|
1064
|
-
description: "Returns a custom doc from EventCatalog by its path",
|
|
1065
|
-
category: "Custom Docs",
|
|
1066
|
-
args: [{ name: "path", type: "string", required: true, description: "Path to the custom doc" }],
|
|
1067
|
-
examples: [{ description: "Get a custom doc", command: 'npx @eventcatalog/cli getCustomDoc "/getting-started"' }]
|
|
1068
|
-
},
|
|
1069
|
-
{
|
|
1070
|
-
name: "getCustomDocs",
|
|
1071
|
-
description: "Returns all custom docs from EventCatalog",
|
|
1072
|
-
category: "Custom Docs",
|
|
1073
|
-
args: [{ name: "options", type: "json", required: false, description: "Options: {path?}" }],
|
|
1074
|
-
examples: [
|
|
1075
|
-
{ description: "Get all custom docs", command: "npx @eventcatalog/cli getCustomDocs" },
|
|
1076
|
-
{ description: "Get docs from a path", command: `npx @eventcatalog/cli getCustomDocs '{"path":"/guides"}'` }
|
|
1077
|
-
]
|
|
1078
|
-
},
|
|
1079
|
-
{
|
|
1080
|
-
name: "writeCustomDoc",
|
|
1081
|
-
description: "Writes a custom doc to EventCatalog",
|
|
1082
|
-
category: "Custom Docs",
|
|
1083
|
-
args: [
|
|
1084
|
-
{ name: "customDoc", type: "json", required: true, description: "Custom doc object with id, title, and markdown" },
|
|
1085
|
-
{ name: "options", type: "json", required: false, description: "Options: {path?, override?}" }
|
|
1086
|
-
],
|
|
1087
|
-
examples: [
|
|
1088
|
-
{
|
|
1089
|
-
description: "Write a custom doc",
|
|
1090
|
-
command: `npx @eventcatalog/cli writeCustomDoc '{"id":"getting-started","title":"Getting Started","markdown":"# Getting Started"}'`
|
|
1091
|
-
}
|
|
1092
|
-
]
|
|
1093
|
-
},
|
|
1094
|
-
{
|
|
1095
|
-
name: "rmCustomDoc",
|
|
1096
|
-
description: "Removes a custom doc by its path",
|
|
1097
|
-
category: "Custom Docs",
|
|
1098
|
-
args: [{ name: "path", type: "string", required: true, description: "Path to the custom doc to remove" }],
|
|
1099
|
-
examples: [{ description: "Remove a custom doc", command: 'npx @eventcatalog/cli rmCustomDoc "/getting-started"' }]
|
|
1100
|
-
},
|
|
1101
|
-
// ================================
|
|
1102
|
-
// Entities
|
|
1103
|
-
// ================================
|
|
1104
|
-
{
|
|
1105
|
-
name: "getEntity",
|
|
1106
|
-
description: "Returns an entity from EventCatalog by its ID",
|
|
1107
|
-
category: "Entities",
|
|
1108
|
-
args: [
|
|
1109
|
-
{ name: "id", type: "string", required: true, description: "The ID of the entity to retrieve" },
|
|
1110
|
-
{ name: "version", type: "string", required: false, description: "Specific version to retrieve" }
|
|
1111
|
-
],
|
|
1112
|
-
examples: [
|
|
1113
|
-
{ description: "Get the latest entity", command: 'npx @eventcatalog/cli getEntity "Order"' },
|
|
1114
|
-
{ description: "Get a specific version", command: 'npx @eventcatalog/cli getEntity "Order" "1.0.0"' }
|
|
1115
|
-
]
|
|
1116
|
-
},
|
|
1117
|
-
{
|
|
1118
|
-
name: "getEntities",
|
|
1119
|
-
description: "Returns all entities from EventCatalog",
|
|
1120
|
-
category: "Entities",
|
|
1121
|
-
args: [{ name: "options", type: "json", required: false, description: "Options: {latestOnly?}" }],
|
|
1122
|
-
examples: [
|
|
1123
|
-
{ description: "Get all entities", command: "npx @eventcatalog/cli getEntities" },
|
|
1124
|
-
{ description: "Get only latest versions", command: `npx @eventcatalog/cli getEntities '{"latestOnly":true}'` }
|
|
1125
|
-
]
|
|
1126
|
-
},
|
|
1127
|
-
{
|
|
1128
|
-
name: "writeEntity",
|
|
1129
|
-
description: "Writes an entity to EventCatalog",
|
|
1130
|
-
category: "Entities",
|
|
1131
|
-
args: [
|
|
1132
|
-
{ name: "entity", type: "json", required: true, description: "Entity object with id, name, version, and markdown" },
|
|
1133
|
-
{ name: "options", type: "json", required: false, description: "Options: {path?, override?, versionExistingContent?}" }
|
|
1134
|
-
],
|
|
1135
|
-
examples: [
|
|
1136
|
-
{
|
|
1137
|
-
description: "Write a new entity",
|
|
1138
|
-
command: `npx @eventcatalog/cli writeEntity '{"id":"Order","name":"Order","version":"1.0.0","markdown":"# Order Entity"}'`
|
|
1139
|
-
}
|
|
1140
|
-
]
|
|
1141
|
-
},
|
|
1142
|
-
{
|
|
1143
|
-
name: "rmEntity",
|
|
1144
|
-
description: "Removes an entity by its path",
|
|
1145
|
-
category: "Entities",
|
|
1146
|
-
args: [{ name: "path", type: "string", required: true, description: "Path to the entity" }],
|
|
1147
|
-
examples: [{ description: "Remove an entity", command: 'npx @eventcatalog/cli rmEntity "/Order"' }]
|
|
1148
|
-
},
|
|
1149
|
-
{
|
|
1150
|
-
name: "rmEntityById",
|
|
1151
|
-
description: "Removes an entity by its ID",
|
|
1152
|
-
category: "Entities",
|
|
1153
|
-
args: [
|
|
1154
|
-
{ name: "id", type: "string", required: true, description: "The ID of the entity to remove" },
|
|
1155
|
-
{ name: "version", type: "string", required: false, description: "Specific version to remove" }
|
|
1156
|
-
],
|
|
1157
|
-
examples: [{ description: "Remove an entity", command: 'npx @eventcatalog/cli rmEntityById "Order"' }]
|
|
1158
|
-
},
|
|
1159
|
-
{
|
|
1160
|
-
name: "versionEntity",
|
|
1161
|
-
description: "Moves the current entity to a versioned directory",
|
|
1162
|
-
category: "Entities",
|
|
1163
|
-
args: [{ name: "id", type: "string", required: true, description: "The ID of the entity to version" }],
|
|
1164
|
-
examples: [{ description: "Version an entity", command: 'npx @eventcatalog/cli versionEntity "Order"' }]
|
|
1165
|
-
},
|
|
1166
|
-
{
|
|
1167
|
-
name: "entityHasVersion",
|
|
1168
|
-
description: "Checks if a specific version of an entity exists",
|
|
1169
|
-
category: "Entities",
|
|
1170
|
-
args: [
|
|
1171
|
-
{ name: "id", type: "string", required: true, description: "The ID of the entity" },
|
|
1172
|
-
{ name: "version", type: "string", required: true, description: "Version to check" }
|
|
1173
|
-
],
|
|
1174
|
-
examples: [{ description: "Check if version exists", command: 'npx @eventcatalog/cli entityHasVersion "Order" "1.0.0"' }]
|
|
1175
|
-
},
|
|
1176
|
-
// ================================
|
|
1177
|
-
// Data Stores
|
|
1178
|
-
// ================================
|
|
1179
|
-
{
|
|
1180
|
-
name: "getDataStore",
|
|
1181
|
-
description: "Returns a data store from EventCatalog by its ID",
|
|
1182
|
-
category: "Data Stores",
|
|
1183
|
-
args: [
|
|
1184
|
-
{ name: "id", type: "string", required: true, description: "The ID of the data store to retrieve" },
|
|
1185
|
-
{ name: "version", type: "string", required: false, description: "Specific version to retrieve" }
|
|
1186
|
-
],
|
|
1187
|
-
examples: [
|
|
1188
|
-
{ description: "Get the latest data store", command: 'npx @eventcatalog/cli getDataStore "orders-db"' },
|
|
1189
|
-
{ description: "Get a specific version", command: 'npx @eventcatalog/cli getDataStore "orders-db" "1.0.0"' }
|
|
1190
|
-
]
|
|
1191
|
-
},
|
|
1192
|
-
{
|
|
1193
|
-
name: "getDataStores",
|
|
1194
|
-
description: "Returns all data stores from EventCatalog",
|
|
1195
|
-
category: "Data Stores",
|
|
1196
|
-
args: [{ name: "options", type: "json", required: false, description: "Options: {latestOnly?}" }],
|
|
1197
|
-
examples: [
|
|
1198
|
-
{ description: "Get all data stores", command: "npx @eventcatalog/cli getDataStores" },
|
|
1199
|
-
{ description: "Get only latest versions", command: `npx @eventcatalog/cli getDataStores '{"latestOnly":true}'` }
|
|
1200
|
-
]
|
|
1201
|
-
},
|
|
1202
|
-
{
|
|
1203
|
-
name: "writeDataStore",
|
|
1204
|
-
description: "Writes a data store to EventCatalog",
|
|
1205
|
-
category: "Data Stores",
|
|
1206
|
-
args: [
|
|
1207
|
-
{
|
|
1208
|
-
name: "dataStore",
|
|
1209
|
-
type: "json",
|
|
1210
|
-
required: true,
|
|
1211
|
-
description: "Data store object with id, name, version, and markdown"
|
|
1212
|
-
},
|
|
1213
|
-
{ name: "options", type: "json", required: false, description: "Options: {path?, override?, versionExistingContent?}" }
|
|
1214
|
-
],
|
|
1215
|
-
examples: [
|
|
1216
|
-
{
|
|
1217
|
-
description: "Write a new data store",
|
|
1218
|
-
command: `npx @eventcatalog/cli writeDataStore '{"id":"orders-db","name":"Orders Database","version":"1.0.0","markdown":"# Orders Database"}'`
|
|
1219
|
-
}
|
|
1220
|
-
]
|
|
1221
|
-
},
|
|
1222
|
-
{
|
|
1223
|
-
name: "writeDataStoreToService",
|
|
1224
|
-
description: "Writes a data store to a specific service",
|
|
1225
|
-
category: "Data Stores",
|
|
1226
|
-
args: [
|
|
1227
|
-
{ name: "dataStore", type: "json", required: true, description: "Data store object" },
|
|
1228
|
-
{ name: "service", type: "json", required: true, description: "Service reference: {id, version?}" }
|
|
1229
|
-
],
|
|
1230
|
-
examples: [
|
|
1231
|
-
{
|
|
1232
|
-
description: "Write data store to a service",
|
|
1233
|
-
command: `npx @eventcatalog/cli writeDataStoreToService '{"id":"orders-db","name":"Orders Database","version":"1.0.0","markdown":"# Orders DB"}' '{"id":"OrderService"}'`
|
|
1234
|
-
}
|
|
1235
|
-
]
|
|
1236
|
-
},
|
|
1237
|
-
{
|
|
1238
|
-
name: "rmDataStore",
|
|
1239
|
-
description: "Removes a data store by its path",
|
|
1240
|
-
category: "Data Stores",
|
|
1241
|
-
args: [{ name: "path", type: "string", required: true, description: "Path to the data store" }],
|
|
1242
|
-
examples: [{ description: "Remove a data store", command: 'npx @eventcatalog/cli rmDataStore "/orders-db"' }]
|
|
1243
|
-
},
|
|
1244
|
-
{
|
|
1245
|
-
name: "rmDataStoreById",
|
|
1246
|
-
description: "Removes a data store by its ID",
|
|
1247
|
-
category: "Data Stores",
|
|
1248
|
-
args: [
|
|
1249
|
-
{ name: "id", type: "string", required: true, description: "The ID of the data store to remove" },
|
|
1250
|
-
{ name: "version", type: "string", required: false, description: "Specific version to remove" }
|
|
1251
|
-
],
|
|
1252
|
-
examples: [{ description: "Remove a data store", command: 'npx @eventcatalog/cli rmDataStoreById "orders-db"' }]
|
|
1253
|
-
},
|
|
1254
|
-
{
|
|
1255
|
-
name: "versionDataStore",
|
|
1256
|
-
description: "Moves the current data store to a versioned directory",
|
|
1257
|
-
category: "Data Stores",
|
|
1258
|
-
args: [{ name: "id", type: "string", required: true, description: "The ID of the data store to version" }],
|
|
1259
|
-
examples: [{ description: "Version a data store", command: 'npx @eventcatalog/cli versionDataStore "orders-db"' }]
|
|
1260
|
-
},
|
|
1261
|
-
{
|
|
1262
|
-
name: "addFileToDataStore",
|
|
1263
|
-
description: "Adds a file to a data store",
|
|
1264
|
-
category: "Data Stores",
|
|
1265
|
-
args: [
|
|
1266
|
-
{ name: "id", type: "string", required: true, description: "The ID of the data store" },
|
|
1267
|
-
{ name: "file", type: "json", required: true, description: "File object: {content, fileName}" },
|
|
1268
|
-
{ name: "version", type: "string", required: false, description: "Specific version" }
|
|
1269
|
-
],
|
|
1270
|
-
examples: [
|
|
1271
|
-
{
|
|
1272
|
-
description: "Add a file to a data store",
|
|
1273
|
-
command: `npx @eventcatalog/cli addFileToDataStore "orders-db" '{"content":"# Schema","fileName":"schema.md"}'`
|
|
1274
|
-
}
|
|
1275
|
-
]
|
|
1276
|
-
},
|
|
1277
|
-
{
|
|
1278
|
-
name: "dataStoreHasVersion",
|
|
1279
|
-
description: "Checks if a specific version of a data store exists",
|
|
1280
|
-
category: "Data Stores",
|
|
1281
|
-
args: [
|
|
1282
|
-
{ name: "id", type: "string", required: true, description: "The ID of the data store" },
|
|
1283
|
-
{ name: "version", type: "string", required: true, description: "Version to check" }
|
|
1284
|
-
],
|
|
1285
|
-
examples: [
|
|
1286
|
-
{ description: "Check if version exists", command: 'npx @eventcatalog/cli dataStoreHasVersion "orders-db" "1.0.0"' }
|
|
1287
|
-
]
|
|
1288
|
-
},
|
|
1289
|
-
// ================================
|
|
1290
|
-
// Data Products
|
|
1291
|
-
// ================================
|
|
1292
|
-
{
|
|
1293
|
-
name: "getDataProduct",
|
|
1294
|
-
description: "Returns a data product from EventCatalog by its ID",
|
|
1295
|
-
category: "Data Products",
|
|
1296
|
-
args: [
|
|
1297
|
-
{ name: "id", type: "string", required: true, description: "The ID of the data product to retrieve" },
|
|
1298
|
-
{ name: "version", type: "string", required: false, description: "Specific version to retrieve" }
|
|
1299
|
-
],
|
|
1300
|
-
examples: [
|
|
1301
|
-
{ description: "Get the latest data product", command: 'npx @eventcatalog/cli getDataProduct "customer-360"' },
|
|
1302
|
-
{ description: "Get a specific version", command: 'npx @eventcatalog/cli getDataProduct "customer-360" "1.0.0"' }
|
|
1303
|
-
]
|
|
1304
|
-
},
|
|
1305
|
-
{
|
|
1306
|
-
name: "getDataProducts",
|
|
1307
|
-
description: "Returns all data products from EventCatalog",
|
|
1308
|
-
category: "Data Products",
|
|
1309
|
-
args: [{ name: "options", type: "json", required: false, description: "Options: {latestOnly?}" }],
|
|
1310
|
-
examples: [
|
|
1311
|
-
{ description: "Get all data products", command: "npx @eventcatalog/cli getDataProducts" },
|
|
1312
|
-
{ description: "Get only latest versions", command: `npx @eventcatalog/cli getDataProducts '{"latestOnly":true}'` }
|
|
1313
|
-
]
|
|
1314
|
-
},
|
|
1315
|
-
{
|
|
1316
|
-
name: "writeDataProduct",
|
|
1317
|
-
description: "Writes a data product to EventCatalog",
|
|
1318
|
-
category: "Data Products",
|
|
1319
|
-
args: [
|
|
1320
|
-
{
|
|
1321
|
-
name: "dataProduct",
|
|
1322
|
-
type: "json",
|
|
1323
|
-
required: true,
|
|
1324
|
-
description: "Data product object with id, name, version, and markdown"
|
|
1325
|
-
},
|
|
1326
|
-
{ name: "options", type: "json", required: false, description: "Options: {path?, override?, versionExistingContent?}" }
|
|
1327
|
-
],
|
|
1328
|
-
examples: [
|
|
1329
|
-
{
|
|
1330
|
-
description: "Write a new data product",
|
|
1331
|
-
command: `npx @eventcatalog/cli writeDataProduct '{"id":"customer-360","name":"Customer 360","version":"1.0.0","markdown":"# Customer 360"}'`
|
|
1332
|
-
}
|
|
1333
|
-
]
|
|
1334
|
-
},
|
|
1335
|
-
{
|
|
1336
|
-
name: "writeDataProductToDomain",
|
|
1337
|
-
description: "Writes a data product to a specific domain",
|
|
1338
|
-
category: "Data Products",
|
|
1339
|
-
args: [
|
|
1340
|
-
{ name: "dataProduct", type: "json", required: true, description: "Data product object" },
|
|
1341
|
-
{ name: "domain", type: "json", required: true, description: "Domain reference: {id, version?}" },
|
|
1342
|
-
{ name: "options", type: "json", required: false, description: "Options" }
|
|
1343
|
-
],
|
|
1344
|
-
examples: [
|
|
1345
|
-
{
|
|
1346
|
-
description: "Write data product to a domain",
|
|
1347
|
-
command: `npx @eventcatalog/cli writeDataProductToDomain '{"id":"customer-360","name":"Customer 360","version":"1.0.0","markdown":"# Customer 360"}' '{"id":"Analytics"}'`
|
|
1348
|
-
}
|
|
1349
|
-
]
|
|
1350
|
-
},
|
|
1351
|
-
{
|
|
1352
|
-
name: "rmDataProduct",
|
|
1353
|
-
description: "Removes a data product by its path",
|
|
1354
|
-
category: "Data Products",
|
|
1355
|
-
args: [{ name: "path", type: "string", required: true, description: "Path to the data product" }],
|
|
1356
|
-
examples: [{ description: "Remove a data product", command: 'npx @eventcatalog/cli rmDataProduct "/customer-360"' }]
|
|
1357
|
-
},
|
|
1358
|
-
{
|
|
1359
|
-
name: "rmDataProductById",
|
|
1360
|
-
description: "Removes a data product by its ID",
|
|
1361
|
-
category: "Data Products",
|
|
1362
|
-
args: [
|
|
1363
|
-
{ name: "id", type: "string", required: true, description: "The ID of the data product to remove" },
|
|
1364
|
-
{ name: "version", type: "string", required: false, description: "Specific version to remove" }
|
|
1365
|
-
],
|
|
1366
|
-
examples: [{ description: "Remove a data product", command: 'npx @eventcatalog/cli rmDataProductById "customer-360"' }]
|
|
1367
|
-
},
|
|
1368
|
-
{
|
|
1369
|
-
name: "versionDataProduct",
|
|
1370
|
-
description: "Moves the current data product to a versioned directory",
|
|
1371
|
-
category: "Data Products",
|
|
1372
|
-
args: [{ name: "id", type: "string", required: true, description: "The ID of the data product to version" }],
|
|
1373
|
-
examples: [{ description: "Version a data product", command: 'npx @eventcatalog/cli versionDataProduct "customer-360"' }]
|
|
1374
|
-
},
|
|
1375
|
-
{
|
|
1376
|
-
name: "addFileToDataProduct",
|
|
1377
|
-
description: "Adds a file to a data product",
|
|
1378
|
-
category: "Data Products",
|
|
1379
|
-
args: [
|
|
1380
|
-
{ name: "id", type: "string", required: true, description: "The ID of the data product" },
|
|
1381
|
-
{ name: "file", type: "json", required: true, description: "File object: {content, fileName}" },
|
|
1382
|
-
{ name: "version", type: "string", required: false, description: "Specific version" }
|
|
1383
|
-
],
|
|
1384
|
-
examples: [
|
|
1385
|
-
{
|
|
1386
|
-
description: "Add a file to a data product",
|
|
1387
|
-
command: `npx @eventcatalog/cli addFileToDataProduct "customer-360" '{"content":"# Schema","fileName":"schema.md"}'`
|
|
1388
|
-
}
|
|
1389
|
-
]
|
|
1390
|
-
},
|
|
1391
|
-
{
|
|
1392
|
-
name: "addDataProductToDomain",
|
|
1393
|
-
description: "Adds a data product reference to a domain",
|
|
1394
|
-
category: "Data Products",
|
|
1395
|
-
args: [
|
|
1396
|
-
{ name: "domainId", type: "string", required: true, description: "The ID of the domain" },
|
|
1397
|
-
{ name: "dataProduct", type: "json", required: true, description: "Data product reference: {id, version}" },
|
|
1398
|
-
{ name: "domainVersion", type: "string", required: false, description: "Specific domain version" }
|
|
1399
|
-
],
|
|
1400
|
-
examples: [
|
|
1401
|
-
{
|
|
1402
|
-
description: "Add data product to domain",
|
|
1403
|
-
command: `npx @eventcatalog/cli addDataProductToDomain "Analytics" '{"id":"customer-360","version":"1.0.0"}'`
|
|
1404
|
-
}
|
|
1405
|
-
]
|
|
1406
|
-
},
|
|
1407
|
-
{
|
|
1408
|
-
name: "dataProductHasVersion",
|
|
1409
|
-
description: "Checks if a specific version of a data product exists",
|
|
1410
|
-
category: "Data Products",
|
|
1411
|
-
args: [
|
|
1412
|
-
{ name: "id", type: "string", required: true, description: "The ID of the data product" },
|
|
1413
|
-
{ name: "version", type: "string", required: true, description: "Version to check" }
|
|
1414
|
-
],
|
|
1415
|
-
examples: [
|
|
1416
|
-
{
|
|
1417
|
-
description: "Check if version exists",
|
|
1418
|
-
command: 'npx @eventcatalog/cli dataProductHasVersion "customer-360" "1.0.0"'
|
|
1419
|
-
}
|
|
1420
|
-
]
|
|
1421
|
-
},
|
|
1422
|
-
// ================================
|
|
1423
|
-
// Diagrams
|
|
1424
|
-
// ================================
|
|
1425
|
-
{
|
|
1426
|
-
name: "getDiagram",
|
|
1427
|
-
description: "Returns a diagram from EventCatalog by its ID",
|
|
1428
|
-
category: "Diagrams",
|
|
1429
|
-
args: [
|
|
1430
|
-
{ name: "id", type: "string", required: true, description: "The ID of the diagram to retrieve" },
|
|
1431
|
-
{ name: "version", type: "string", required: false, description: "Specific version to retrieve" }
|
|
1432
|
-
],
|
|
1433
|
-
examples: [
|
|
1434
|
-
{ description: "Get the latest diagram", command: 'npx @eventcatalog/cli getDiagram "ArchitectureDiagram"' },
|
|
1435
|
-
{ description: "Get a specific version", command: 'npx @eventcatalog/cli getDiagram "ArchitectureDiagram" "1.0.0"' }
|
|
1436
|
-
]
|
|
1437
|
-
},
|
|
1438
|
-
{
|
|
1439
|
-
name: "getDiagrams",
|
|
1440
|
-
description: "Returns all diagrams from EventCatalog",
|
|
1441
|
-
category: "Diagrams",
|
|
1442
|
-
args: [{ name: "options", type: "json", required: false, description: "Options: {latestOnly?}" }],
|
|
1443
|
-
examples: [
|
|
1444
|
-
{ description: "Get all diagrams", command: "npx @eventcatalog/cli getDiagrams" },
|
|
1445
|
-
{ description: "Get only latest versions", command: `npx @eventcatalog/cli getDiagrams '{"latestOnly":true}'` }
|
|
1446
|
-
]
|
|
1447
|
-
},
|
|
1448
|
-
{
|
|
1449
|
-
name: "writeDiagram",
|
|
1450
|
-
description: "Writes a diagram to EventCatalog",
|
|
1451
|
-
category: "Diagrams",
|
|
1452
|
-
args: [
|
|
1453
|
-
{
|
|
1454
|
-
name: "diagram",
|
|
1455
|
-
type: "json",
|
|
1456
|
-
required: true,
|
|
1457
|
-
description: "Diagram object with id, name, version, and markdown"
|
|
1458
|
-
},
|
|
1459
|
-
{ name: "options", type: "json", required: false, description: "Options: {path?, override?, versionExistingContent?}" }
|
|
1460
|
-
],
|
|
1461
|
-
examples: [
|
|
1462
|
-
{
|
|
1463
|
-
description: "Write a new diagram",
|
|
1464
|
-
command: `npx @eventcatalog/cli writeDiagram '{"id":"ArchitectureDiagram","name":"Architecture Diagram","version":"1.0.0","markdown":"# Architecture Diagram"}'`
|
|
1465
|
-
}
|
|
1466
|
-
]
|
|
1467
|
-
},
|
|
1468
|
-
{
|
|
1469
|
-
name: "rmDiagram",
|
|
1470
|
-
description: "Removes a diagram by its path",
|
|
1471
|
-
category: "Diagrams",
|
|
1472
|
-
args: [{ name: "path", type: "string", required: true, description: "Path to the diagram" }],
|
|
1473
|
-
examples: [{ description: "Remove a diagram", command: 'npx @eventcatalog/cli rmDiagram "/ArchitectureDiagram"' }]
|
|
1474
|
-
},
|
|
1475
|
-
{
|
|
1476
|
-
name: "rmDiagramById",
|
|
1477
|
-
description: "Removes a diagram by its ID",
|
|
1478
|
-
category: "Diagrams",
|
|
1479
|
-
args: [
|
|
1480
|
-
{ name: "id", type: "string", required: true, description: "The ID of the diagram to remove" },
|
|
1481
|
-
{ name: "version", type: "string", required: false, description: "Specific version to remove" }
|
|
1482
|
-
],
|
|
1483
|
-
examples: [{ description: "Remove a diagram", command: 'npx @eventcatalog/cli rmDiagramById "ArchitectureDiagram"' }]
|
|
1484
|
-
},
|
|
1485
|
-
{
|
|
1486
|
-
name: "versionDiagram",
|
|
1487
|
-
description: "Moves the current diagram to a versioned directory",
|
|
1488
|
-
category: "Diagrams",
|
|
1489
|
-
args: [{ name: "id", type: "string", required: true, description: "The ID of the diagram to version" }],
|
|
1490
|
-
examples: [{ description: "Version a diagram", command: 'npx @eventcatalog/cli versionDiagram "ArchitectureDiagram"' }]
|
|
1491
|
-
},
|
|
1492
|
-
{
|
|
1493
|
-
name: "addFileToDiagram",
|
|
1494
|
-
description: "Adds a file to a diagram",
|
|
1495
|
-
category: "Diagrams",
|
|
1496
|
-
args: [
|
|
1497
|
-
{ name: "id", type: "string", required: true, description: "The ID of the diagram" },
|
|
1498
|
-
{ name: "file", type: "json", required: true, description: "File object: {content, fileName}" },
|
|
1499
|
-
{ name: "version", type: "string", required: false, description: "Specific version" }
|
|
1500
|
-
],
|
|
1501
|
-
examples: [
|
|
1502
|
-
{
|
|
1503
|
-
description: "Add a file to a diagram",
|
|
1504
|
-
command: `npx @eventcatalog/cli addFileToDiagram "ArchitectureDiagram" '{"content":"...","fileName":"diagram.png"}'`
|
|
1505
|
-
}
|
|
1506
|
-
]
|
|
1507
|
-
},
|
|
1508
|
-
{
|
|
1509
|
-
name: "diagramHasVersion",
|
|
1510
|
-
description: "Checks if a specific version of a diagram exists",
|
|
1511
|
-
category: "Diagrams",
|
|
1512
|
-
args: [
|
|
1513
|
-
{ name: "id", type: "string", required: true, description: "The ID of the diagram" },
|
|
1514
|
-
{ name: "version", type: "string", required: true, description: "Version to check" }
|
|
1515
|
-
],
|
|
1516
|
-
examples: [
|
|
1517
|
-
{
|
|
1518
|
-
description: "Check if version exists",
|
|
1519
|
-
command: 'npx @eventcatalog/cli diagramHasVersion "ArchitectureDiagram" "1.0.0"'
|
|
1520
|
-
}
|
|
1521
|
-
]
|
|
1522
|
-
},
|
|
1523
|
-
// ================================
|
|
1524
|
-
// Messages
|
|
1525
|
-
// ================================
|
|
1526
|
-
{
|
|
1527
|
-
name: "getProducersAndConsumersForMessage",
|
|
1528
|
-
description: "Returns the producers and consumers (services) for a given message",
|
|
1529
|
-
category: "Messages",
|
|
1530
|
-
args: [
|
|
1531
|
-
{ name: "id", type: "string", required: true, description: "The ID of the message" },
|
|
1532
|
-
{ name: "version", type: "string", required: false, description: "Specific version" }
|
|
1533
|
-
],
|
|
1534
|
-
examples: [
|
|
1535
|
-
{
|
|
1536
|
-
description: "Get producers and consumers",
|
|
1537
|
-
command: 'npx @eventcatalog/cli getProducersAndConsumersForMessage "OrderCreated"'
|
|
1538
|
-
}
|
|
1539
|
-
]
|
|
1540
|
-
},
|
|
1541
|
-
{
|
|
1542
|
-
name: "getConsumersOfSchema",
|
|
1543
|
-
description: "Returns services that consume a given schema",
|
|
1544
|
-
category: "Messages",
|
|
1545
|
-
args: [{ name: "schemaPath", type: "string", required: true, description: "Path to the schema file" }],
|
|
1546
|
-
examples: [
|
|
1547
|
-
{
|
|
1548
|
-
description: "Get consumers of a schema",
|
|
1549
|
-
command: 'npx @eventcatalog/cli getConsumersOfSchema "events/OrderCreated/schema.json"'
|
|
1550
|
-
}
|
|
1551
|
-
]
|
|
1552
|
-
},
|
|
1553
|
-
{
|
|
1554
|
-
name: "getProducersOfSchema",
|
|
1555
|
-
description: "Returns services that produce a given schema",
|
|
1556
|
-
category: "Messages",
|
|
1557
|
-
args: [{ name: "schemaPath", type: "string", required: true, description: "Path to the schema file" }],
|
|
1558
|
-
examples: [
|
|
1559
|
-
{
|
|
1560
|
-
description: "Get producers of a schema",
|
|
1561
|
-
command: 'npx @eventcatalog/cli getProducersOfSchema "events/OrderCreated/schema.json"'
|
|
1562
|
-
}
|
|
1563
|
-
]
|
|
1564
|
-
},
|
|
1565
|
-
{
|
|
1566
|
-
name: "getOwnersForResource",
|
|
1567
|
-
description: "Returns the owners (users/teams) for a given resource",
|
|
1568
|
-
category: "Messages",
|
|
1569
|
-
args: [
|
|
1570
|
-
{ name: "id", type: "string", required: true, description: "The ID of the resource" },
|
|
1571
|
-
{ name: "version", type: "string", required: false, description: "Specific version" }
|
|
1572
|
-
],
|
|
1573
|
-
examples: [
|
|
1574
|
-
{ description: "Get owners for a resource", command: 'npx @eventcatalog/cli getOwnersForResource "OrderService"' }
|
|
1575
|
-
]
|
|
1576
|
-
},
|
|
1577
|
-
// ================================
|
|
1578
|
-
// Utilities
|
|
1579
|
-
// ================================
|
|
1580
|
-
{
|
|
1581
|
-
name: "dumpCatalog",
|
|
1582
|
-
description: "Dumps the entire catalog to a JSON structure",
|
|
1583
|
-
category: "Utilities",
|
|
1584
|
-
args: [],
|
|
1585
|
-
examples: [
|
|
1586
|
-
{ description: "Dump entire catalog", command: "npx @eventcatalog/cli dumpCatalog" },
|
|
1587
|
-
{ description: "Dump and save to file", command: "npx @eventcatalog/cli dumpCatalog > catalog.json" }
|
|
1588
|
-
]
|
|
1589
|
-
},
|
|
1590
|
-
{
|
|
1591
|
-
name: "getEventCatalogConfigurationFile",
|
|
1592
|
-
description: "Returns the EventCatalog configuration file",
|
|
1593
|
-
category: "Utilities",
|
|
1594
|
-
args: [],
|
|
1595
|
-
examples: [{ description: "Get config file", command: "npx @eventcatalog/cli getEventCatalogConfigurationFile" }]
|
|
1596
|
-
}
|
|
1597
|
-
];
|
|
1598
|
-
function getCategories() {
|
|
1599
|
-
return [...new Set(cliFunctions.map((fn) => fn.category))];
|
|
1600
|
-
}
|
|
1601
|
-
function getFunctionsByCategory(category) {
|
|
1602
|
-
return cliFunctions.filter((fn) => fn.category === category);
|
|
1603
|
-
}
|
|
1604
|
-
function getFunction(name) {
|
|
1605
|
-
return cliFunctions.find((fn) => fn.name === name);
|
|
1606
|
-
}
|
|
1607
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
1608
|
-
0 && (module.exports = {
|
|
1609
|
-
cliFunctions,
|
|
1610
|
-
getCategories,
|
|
1611
|
-
getFunction,
|
|
1612
|
-
getFunctionsByCategory
|
|
1613
|
-
});
|
|
1614
|
-
//# sourceMappingURL=cli-docs.js.map
|