@eventcatalog/sdk 2.8.0 → 2.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/containers.d.mts +179 -0
- package/dist/containers.d.ts +179 -0
- package/dist/containers.js +374 -0
- package/dist/containers.js.map +1 -0
- package/dist/containers.mjs +331 -0
- package/dist/containers.mjs.map +1 -0
- package/dist/data-stores.d.mts +179 -0
- package/dist/data-stores.d.ts +179 -0
- package/dist/data-stores.js +387 -0
- package/dist/data-stores.js.map +1 -0
- package/dist/data-stores.mjs +342 -0
- package/dist/data-stores.mjs.map +1 -0
- package/dist/eventcatalog.js +207 -102
- package/dist/eventcatalog.js.map +1 -1
- package/dist/eventcatalog.mjs +209 -104
- package/dist/eventcatalog.mjs.map +1 -1
- package/dist/index.d.mts +96 -31
- package/dist/index.d.ts +96 -31
- package/dist/index.js +203 -98
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +203 -98
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.d.mts +24 -1
- package/dist/types.d.d.ts +24 -1
- package/dist/types.d.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ __export(index_exports, {
|
|
|
33
33
|
default: () => index_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(index_exports);
|
|
36
|
-
var
|
|
36
|
+
var import_node_path17 = require("path");
|
|
37
37
|
|
|
38
38
|
// src/events.ts
|
|
39
39
|
var import_promises2 = __toESM(require("fs/promises"));
|
|
@@ -1123,6 +1123,49 @@ var entityHasVersion = (directory) => async (id, version) => {
|
|
|
1123
1123
|
return !!file;
|
|
1124
1124
|
};
|
|
1125
1125
|
|
|
1126
|
+
// src/containers.ts
|
|
1127
|
+
var import_promises11 = __toESM(require("fs/promises"));
|
|
1128
|
+
var import_node_path16 = require("path");
|
|
1129
|
+
var getContainer = (directory) => async (id, version) => getResource(directory, id, version, { type: "container" });
|
|
1130
|
+
var getContainers = (directory) => async (options) => getResources(directory, { type: "containers", latestOnly: options?.latestOnly });
|
|
1131
|
+
var writeContainer = (directory) => async (data, options = {
|
|
1132
|
+
path: "",
|
|
1133
|
+
override: false,
|
|
1134
|
+
format: "mdx"
|
|
1135
|
+
}) => writeResource(directory, { ...data }, { ...options, type: "container" });
|
|
1136
|
+
var versionContainer = (directory) => async (id) => versionResource(directory, id);
|
|
1137
|
+
var rmContainer = (directory) => async (path5) => {
|
|
1138
|
+
await import_promises11.default.rm((0, import_node_path16.join)(directory, path5), { recursive: true });
|
|
1139
|
+
};
|
|
1140
|
+
var rmContainerById = (directory) => async (id, version, persistFiles) => {
|
|
1141
|
+
await rmResourceById(directory, id, version, { type: "container", persistFiles });
|
|
1142
|
+
};
|
|
1143
|
+
var containerHasVersion = (directory) => async (id, version) => {
|
|
1144
|
+
const file = await findFileById(directory, id, version);
|
|
1145
|
+
return !!file;
|
|
1146
|
+
};
|
|
1147
|
+
var addFileToContainer = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
|
|
1148
|
+
var writeContainerToService = (directory) => async (container, service, options = { path: "", format: "mdx", override: false }) => {
|
|
1149
|
+
const resourcePath = await getResourcePath(directory, service.id, service.version);
|
|
1150
|
+
if (!resourcePath) {
|
|
1151
|
+
throw new Error("Service not found");
|
|
1152
|
+
}
|
|
1153
|
+
let pathForContainer = service.version && service.version !== "latest" ? `${resourcePath.directory}/versioned/${service.version}/containers` : `${resourcePath.directory}/containers`;
|
|
1154
|
+
pathForContainer = (0, import_node_path16.join)(pathForContainer, container.id);
|
|
1155
|
+
await writeResource(directory, { ...container }, { ...options, path: pathForContainer, type: "container" });
|
|
1156
|
+
};
|
|
1157
|
+
|
|
1158
|
+
// src/data-stores.ts
|
|
1159
|
+
var getDataStore = getContainer;
|
|
1160
|
+
var getDataStores = getContainers;
|
|
1161
|
+
var writeDataStore = writeContainer;
|
|
1162
|
+
var versionDataStore = versionContainer;
|
|
1163
|
+
var rmDataStore = rmContainer;
|
|
1164
|
+
var rmDataStoreById = rmContainerById;
|
|
1165
|
+
var dataStoreHasVersion = containerHasVersion;
|
|
1166
|
+
var addFileToDataStore = addFileToContainer;
|
|
1167
|
+
var writeDataStoreToService = writeContainerToService;
|
|
1168
|
+
|
|
1126
1169
|
// src/index.ts
|
|
1127
1170
|
var index_default = (path5) => {
|
|
1128
1171
|
return {
|
|
@@ -1132,13 +1175,13 @@ var index_default = (path5) => {
|
|
|
1132
1175
|
* @param version - Optional id of the version to get (supports semver)
|
|
1133
1176
|
* @returns Event|Undefined
|
|
1134
1177
|
*/
|
|
1135
|
-
getEvent: getEvent((0,
|
|
1178
|
+
getEvent: getEvent((0, import_node_path17.join)(path5)),
|
|
1136
1179
|
/**
|
|
1137
1180
|
* Returns all events from EventCatalog
|
|
1138
1181
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1139
1182
|
* @returns Event[]|Undefined
|
|
1140
1183
|
*/
|
|
1141
|
-
getEvents: getEvents((0,
|
|
1184
|
+
getEvents: getEvents((0, import_node_path17.join)(path5)),
|
|
1142
1185
|
/**
|
|
1143
1186
|
* Adds an event to EventCatalog
|
|
1144
1187
|
*
|
|
@@ -1146,7 +1189,7 @@ var index_default = (path5) => {
|
|
|
1146
1189
|
* @param options - Optional options to write the event
|
|
1147
1190
|
*
|
|
1148
1191
|
*/
|
|
1149
|
-
writeEvent: writeEvent((0,
|
|
1192
|
+
writeEvent: writeEvent((0, import_node_path17.join)(path5, "events")),
|
|
1150
1193
|
/**
|
|
1151
1194
|
* Adds an event to a service in EventCatalog
|
|
1152
1195
|
*
|
|
@@ -1155,26 +1198,26 @@ var index_default = (path5) => {
|
|
|
1155
1198
|
* @param options - Optional options to write the event
|
|
1156
1199
|
*
|
|
1157
1200
|
*/
|
|
1158
|
-
writeEventToService: writeEventToService((0,
|
|
1201
|
+
writeEventToService: writeEventToService((0, import_node_path17.join)(path5)),
|
|
1159
1202
|
/**
|
|
1160
1203
|
* Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1161
1204
|
*
|
|
1162
1205
|
* @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
|
|
1163
1206
|
*
|
|
1164
1207
|
*/
|
|
1165
|
-
rmEvent: rmEvent((0,
|
|
1208
|
+
rmEvent: rmEvent((0, import_node_path17.join)(path5, "events")),
|
|
1166
1209
|
/**
|
|
1167
1210
|
* Remove an event by an Event id
|
|
1168
1211
|
*
|
|
1169
1212
|
* @param id - The id of the event you want to remove
|
|
1170
1213
|
*
|
|
1171
1214
|
*/
|
|
1172
|
-
rmEventById: rmEventById((0,
|
|
1215
|
+
rmEventById: rmEventById((0, import_node_path17.join)(path5)),
|
|
1173
1216
|
/**
|
|
1174
1217
|
* Moves a given event id to the version directory
|
|
1175
1218
|
* @param directory
|
|
1176
1219
|
*/
|
|
1177
|
-
versionEvent: versionEvent((0,
|
|
1220
|
+
versionEvent: versionEvent((0, import_node_path17.join)(path5)),
|
|
1178
1221
|
/**
|
|
1179
1222
|
* Adds a file to the given event
|
|
1180
1223
|
* @param id - The id of the event to add the file to
|
|
@@ -1182,7 +1225,7 @@ var index_default = (path5) => {
|
|
|
1182
1225
|
* @param version - Optional version of the event to add the file to
|
|
1183
1226
|
* @returns
|
|
1184
1227
|
*/
|
|
1185
|
-
addFileToEvent: addFileToEvent((0,
|
|
1228
|
+
addFileToEvent: addFileToEvent((0, import_node_path17.join)(path5)),
|
|
1186
1229
|
/**
|
|
1187
1230
|
* Adds a schema to the given event
|
|
1188
1231
|
* @param id - The id of the event to add the schema to
|
|
@@ -1190,14 +1233,14 @@ var index_default = (path5) => {
|
|
|
1190
1233
|
* @param version - Optional version of the event to add the schema to
|
|
1191
1234
|
* @returns
|
|
1192
1235
|
*/
|
|
1193
|
-
addSchemaToEvent: addSchemaToEvent((0,
|
|
1236
|
+
addSchemaToEvent: addSchemaToEvent((0, import_node_path17.join)(path5)),
|
|
1194
1237
|
/**
|
|
1195
1238
|
* Check to see if an event version exists
|
|
1196
1239
|
* @param id - The id of the event
|
|
1197
1240
|
* @param version - The version of the event (supports semver)
|
|
1198
1241
|
* @returns
|
|
1199
1242
|
*/
|
|
1200
|
-
eventHasVersion: eventHasVersion((0,
|
|
1243
|
+
eventHasVersion: eventHasVersion((0, import_node_path17.join)(path5)),
|
|
1201
1244
|
/**
|
|
1202
1245
|
* ================================
|
|
1203
1246
|
* Commands
|
|
@@ -1209,13 +1252,13 @@ var index_default = (path5) => {
|
|
|
1209
1252
|
* @param version - Optional id of the version to get (supports semver)
|
|
1210
1253
|
* @returns Command|Undefined
|
|
1211
1254
|
*/
|
|
1212
|
-
getCommand: getCommand((0,
|
|
1255
|
+
getCommand: getCommand((0, import_node_path17.join)(path5)),
|
|
1213
1256
|
/**
|
|
1214
1257
|
* Returns all commands from EventCatalog
|
|
1215
1258
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1216
1259
|
* @returns Command[]|Undefined
|
|
1217
1260
|
*/
|
|
1218
|
-
getCommands: getCommands((0,
|
|
1261
|
+
getCommands: getCommands((0, import_node_path17.join)(path5)),
|
|
1219
1262
|
/**
|
|
1220
1263
|
* Adds an command to EventCatalog
|
|
1221
1264
|
*
|
|
@@ -1223,7 +1266,7 @@ var index_default = (path5) => {
|
|
|
1223
1266
|
* @param options - Optional options to write the command
|
|
1224
1267
|
*
|
|
1225
1268
|
*/
|
|
1226
|
-
writeCommand: writeCommand((0,
|
|
1269
|
+
writeCommand: writeCommand((0, import_node_path17.join)(path5, "commands")),
|
|
1227
1270
|
/**
|
|
1228
1271
|
* Adds a command to a service in EventCatalog
|
|
1229
1272
|
*
|
|
@@ -1232,26 +1275,26 @@ var index_default = (path5) => {
|
|
|
1232
1275
|
* @param options - Optional options to write the command
|
|
1233
1276
|
*
|
|
1234
1277
|
*/
|
|
1235
|
-
writeCommandToService: writeCommandToService((0,
|
|
1278
|
+
writeCommandToService: writeCommandToService((0, import_node_path17.join)(path5)),
|
|
1236
1279
|
/**
|
|
1237
1280
|
* Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1238
1281
|
*
|
|
1239
1282
|
* @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
|
|
1240
1283
|
*
|
|
1241
1284
|
*/
|
|
1242
|
-
rmCommand: rmCommand((0,
|
|
1285
|
+
rmCommand: rmCommand((0, import_node_path17.join)(path5, "commands")),
|
|
1243
1286
|
/**
|
|
1244
1287
|
* Remove an command by an Event id
|
|
1245
1288
|
*
|
|
1246
1289
|
* @param id - The id of the command you want to remove
|
|
1247
1290
|
*
|
|
1248
1291
|
*/
|
|
1249
|
-
rmCommandById: rmCommandById((0,
|
|
1292
|
+
rmCommandById: rmCommandById((0, import_node_path17.join)(path5)),
|
|
1250
1293
|
/**
|
|
1251
1294
|
* Moves a given command id to the version directory
|
|
1252
1295
|
* @param directory
|
|
1253
1296
|
*/
|
|
1254
|
-
versionCommand: versionCommand((0,
|
|
1297
|
+
versionCommand: versionCommand((0, import_node_path17.join)(path5)),
|
|
1255
1298
|
/**
|
|
1256
1299
|
* Adds a file to the given command
|
|
1257
1300
|
* @param id - The id of the command to add the file to
|
|
@@ -1259,7 +1302,7 @@ var index_default = (path5) => {
|
|
|
1259
1302
|
* @param version - Optional version of the command to add the file to
|
|
1260
1303
|
* @returns
|
|
1261
1304
|
*/
|
|
1262
|
-
addFileToCommand: addFileToCommand((0,
|
|
1305
|
+
addFileToCommand: addFileToCommand((0, import_node_path17.join)(path5)),
|
|
1263
1306
|
/**
|
|
1264
1307
|
* Adds a schema to the given command
|
|
1265
1308
|
* @param id - The id of the command to add the schema to
|
|
@@ -1267,14 +1310,14 @@ var index_default = (path5) => {
|
|
|
1267
1310
|
* @param version - Optional version of the command to add the schema to
|
|
1268
1311
|
* @returns
|
|
1269
1312
|
*/
|
|
1270
|
-
addSchemaToCommand: addSchemaToCommand((0,
|
|
1313
|
+
addSchemaToCommand: addSchemaToCommand((0, import_node_path17.join)(path5)),
|
|
1271
1314
|
/**
|
|
1272
1315
|
* Check to see if a command version exists
|
|
1273
1316
|
* @param id - The id of the command
|
|
1274
1317
|
* @param version - The version of the command (supports semver)
|
|
1275
1318
|
* @returns
|
|
1276
1319
|
*/
|
|
1277
|
-
commandHasVersion: commandHasVersion((0,
|
|
1320
|
+
commandHasVersion: commandHasVersion((0, import_node_path17.join)(path5)),
|
|
1278
1321
|
/**
|
|
1279
1322
|
* ================================
|
|
1280
1323
|
* Queries
|
|
@@ -1286,13 +1329,13 @@ var index_default = (path5) => {
|
|
|
1286
1329
|
* @param version - Optional id of the version to get (supports semver)
|
|
1287
1330
|
* @returns Query|Undefined
|
|
1288
1331
|
*/
|
|
1289
|
-
getQuery: getQuery((0,
|
|
1332
|
+
getQuery: getQuery((0, import_node_path17.join)(path5)),
|
|
1290
1333
|
/**
|
|
1291
1334
|
* Returns all queries from EventCatalog
|
|
1292
1335
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1293
1336
|
* @returns Query[]|Undefined
|
|
1294
1337
|
*/
|
|
1295
|
-
getQueries: getQueries((0,
|
|
1338
|
+
getQueries: getQueries((0, import_node_path17.join)(path5)),
|
|
1296
1339
|
/**
|
|
1297
1340
|
* Adds a query to EventCatalog
|
|
1298
1341
|
*
|
|
@@ -1300,7 +1343,7 @@ var index_default = (path5) => {
|
|
|
1300
1343
|
* @param options - Optional options to write the event
|
|
1301
1344
|
*
|
|
1302
1345
|
*/
|
|
1303
|
-
writeQuery: writeQuery((0,
|
|
1346
|
+
writeQuery: writeQuery((0, import_node_path17.join)(path5, "queries")),
|
|
1304
1347
|
/**
|
|
1305
1348
|
* Adds a query to a service in EventCatalog
|
|
1306
1349
|
*
|
|
@@ -1309,26 +1352,26 @@ var index_default = (path5) => {
|
|
|
1309
1352
|
* @param options - Optional options to write the query
|
|
1310
1353
|
*
|
|
1311
1354
|
*/
|
|
1312
|
-
writeQueryToService: writeQueryToService((0,
|
|
1355
|
+
writeQueryToService: writeQueryToService((0, import_node_path17.join)(path5)),
|
|
1313
1356
|
/**
|
|
1314
1357
|
* Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1315
1358
|
*
|
|
1316
1359
|
* @param path - The path to your query, e.g. `/Orders/GetOrder`
|
|
1317
1360
|
*
|
|
1318
1361
|
*/
|
|
1319
|
-
rmQuery: rmQuery((0,
|
|
1362
|
+
rmQuery: rmQuery((0, import_node_path17.join)(path5, "queries")),
|
|
1320
1363
|
/**
|
|
1321
1364
|
* Remove a query by a Query id
|
|
1322
1365
|
*
|
|
1323
1366
|
* @param id - The id of the query you want to remove
|
|
1324
1367
|
*
|
|
1325
1368
|
*/
|
|
1326
|
-
rmQueryById: rmQueryById((0,
|
|
1369
|
+
rmQueryById: rmQueryById((0, import_node_path17.join)(path5)),
|
|
1327
1370
|
/**
|
|
1328
1371
|
* Moves a given query id to the version directory
|
|
1329
1372
|
* @param directory
|
|
1330
1373
|
*/
|
|
1331
|
-
versionQuery: versionQuery((0,
|
|
1374
|
+
versionQuery: versionQuery((0, import_node_path17.join)(path5)),
|
|
1332
1375
|
/**
|
|
1333
1376
|
* Adds a file to the given query
|
|
1334
1377
|
* @param id - The id of the query to add the file to
|
|
@@ -1336,7 +1379,7 @@ var index_default = (path5) => {
|
|
|
1336
1379
|
* @param version - Optional version of the query to add the file to
|
|
1337
1380
|
* @returns
|
|
1338
1381
|
*/
|
|
1339
|
-
addFileToQuery: addFileToQuery((0,
|
|
1382
|
+
addFileToQuery: addFileToQuery((0, import_node_path17.join)(path5)),
|
|
1340
1383
|
/**
|
|
1341
1384
|
* Adds a schema to the given query
|
|
1342
1385
|
* @param id - The id of the query to add the schema to
|
|
@@ -1344,14 +1387,14 @@ var index_default = (path5) => {
|
|
|
1344
1387
|
* @param version - Optional version of the query to add the schema to
|
|
1345
1388
|
* @returns
|
|
1346
1389
|
*/
|
|
1347
|
-
addSchemaToQuery: addSchemaToQuery((0,
|
|
1390
|
+
addSchemaToQuery: addSchemaToQuery((0, import_node_path17.join)(path5)),
|
|
1348
1391
|
/**
|
|
1349
1392
|
* Check to see if an query version exists
|
|
1350
1393
|
* @param id - The id of the query
|
|
1351
1394
|
* @param version - The version of the query (supports semver)
|
|
1352
1395
|
* @returns
|
|
1353
1396
|
*/
|
|
1354
|
-
queryHasVersion: queryHasVersion((0,
|
|
1397
|
+
queryHasVersion: queryHasVersion((0, import_node_path17.join)(path5)),
|
|
1355
1398
|
/**
|
|
1356
1399
|
* ================================
|
|
1357
1400
|
* Channels
|
|
@@ -1363,13 +1406,13 @@ var index_default = (path5) => {
|
|
|
1363
1406
|
* @param version - Optional id of the version to get (supports semver)
|
|
1364
1407
|
* @returns Channel|Undefined
|
|
1365
1408
|
*/
|
|
1366
|
-
getChannel: getChannel((0,
|
|
1409
|
+
getChannel: getChannel((0, import_node_path17.join)(path5)),
|
|
1367
1410
|
/**
|
|
1368
1411
|
* Returns all channels from EventCatalog
|
|
1369
1412
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1370
1413
|
* @returns Channel[]|Undefined
|
|
1371
1414
|
*/
|
|
1372
|
-
getChannels: getChannels((0,
|
|
1415
|
+
getChannels: getChannels((0, import_node_path17.join)(path5)),
|
|
1373
1416
|
/**
|
|
1374
1417
|
* Adds an channel to EventCatalog
|
|
1375
1418
|
*
|
|
@@ -1377,33 +1420,33 @@ var index_default = (path5) => {
|
|
|
1377
1420
|
* @param options - Optional options to write the channel
|
|
1378
1421
|
*
|
|
1379
1422
|
*/
|
|
1380
|
-
writeChannel: writeChannel((0,
|
|
1423
|
+
writeChannel: writeChannel((0, import_node_path17.join)(path5, "channels")),
|
|
1381
1424
|
/**
|
|
1382
1425
|
* Remove an channel to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1383
1426
|
*
|
|
1384
1427
|
* @param path - The path to your channel, e.g. `/Inventory/InventoryAdjusted`
|
|
1385
1428
|
*
|
|
1386
1429
|
*/
|
|
1387
|
-
rmChannel: rmChannel((0,
|
|
1430
|
+
rmChannel: rmChannel((0, import_node_path17.join)(path5, "channels")),
|
|
1388
1431
|
/**
|
|
1389
1432
|
* Remove an channel by an Event id
|
|
1390
1433
|
*
|
|
1391
1434
|
* @param id - The id of the channel you want to remove
|
|
1392
1435
|
*
|
|
1393
1436
|
*/
|
|
1394
|
-
rmChannelById: rmChannelById((0,
|
|
1437
|
+
rmChannelById: rmChannelById((0, import_node_path17.join)(path5)),
|
|
1395
1438
|
/**
|
|
1396
1439
|
* Moves a given channel id to the version directory
|
|
1397
1440
|
* @param directory
|
|
1398
1441
|
*/
|
|
1399
|
-
versionChannel: versionChannel((0,
|
|
1442
|
+
versionChannel: versionChannel((0, import_node_path17.join)(path5)),
|
|
1400
1443
|
/**
|
|
1401
1444
|
* Check to see if a channel version exists
|
|
1402
1445
|
* @param id - The id of the channel
|
|
1403
1446
|
* @param version - The version of the channel (supports semver)
|
|
1404
1447
|
* @returns
|
|
1405
1448
|
*/
|
|
1406
|
-
channelHasVersion: channelHasVersion((0,
|
|
1449
|
+
channelHasVersion: channelHasVersion((0, import_node_path17.join)(path5)),
|
|
1407
1450
|
/**
|
|
1408
1451
|
* Add a channel to an event
|
|
1409
1452
|
*
|
|
@@ -1420,7 +1463,7 @@ var index_default = (path5) => {
|
|
|
1420
1463
|
*
|
|
1421
1464
|
* ```
|
|
1422
1465
|
*/
|
|
1423
|
-
addEventToChannel: addMessageToChannel((0,
|
|
1466
|
+
addEventToChannel: addMessageToChannel((0, import_node_path17.join)(path5), "events"),
|
|
1424
1467
|
/**
|
|
1425
1468
|
* Add a channel to an command
|
|
1426
1469
|
*
|
|
@@ -1437,7 +1480,7 @@ var index_default = (path5) => {
|
|
|
1437
1480
|
*
|
|
1438
1481
|
* ```
|
|
1439
1482
|
*/
|
|
1440
|
-
addCommandToChannel: addMessageToChannel((0,
|
|
1483
|
+
addCommandToChannel: addMessageToChannel((0, import_node_path17.join)(path5), "commands"),
|
|
1441
1484
|
/**
|
|
1442
1485
|
* Add a channel to an query
|
|
1443
1486
|
*
|
|
@@ -1454,7 +1497,7 @@ var index_default = (path5) => {
|
|
|
1454
1497
|
*
|
|
1455
1498
|
* ```
|
|
1456
1499
|
*/
|
|
1457
|
-
addQueryToChannel: addMessageToChannel((0,
|
|
1500
|
+
addQueryToChannel: addMessageToChannel((0, import_node_path17.join)(path5), "queries"),
|
|
1458
1501
|
/**
|
|
1459
1502
|
* ================================
|
|
1460
1503
|
* SERVICES
|
|
@@ -1467,14 +1510,14 @@ var index_default = (path5) => {
|
|
|
1467
1510
|
* @param options - Optional options to write the event
|
|
1468
1511
|
*
|
|
1469
1512
|
*/
|
|
1470
|
-
writeService: writeService((0,
|
|
1513
|
+
writeService: writeService((0, import_node_path17.join)(path5, "services")),
|
|
1471
1514
|
/**
|
|
1472
1515
|
* Adds a versioned service to EventCatalog
|
|
1473
1516
|
*
|
|
1474
1517
|
* @param service - The service to write
|
|
1475
1518
|
*
|
|
1476
1519
|
*/
|
|
1477
|
-
writeVersionedService: writeVersionedService((0,
|
|
1520
|
+
writeVersionedService: writeVersionedService((0, import_node_path17.join)(path5, "services")),
|
|
1478
1521
|
/**
|
|
1479
1522
|
* Adds a service to a domain in EventCatalog
|
|
1480
1523
|
*
|
|
@@ -1483,45 +1526,45 @@ var index_default = (path5) => {
|
|
|
1483
1526
|
* @param options - Optional options to write the event
|
|
1484
1527
|
*
|
|
1485
1528
|
*/
|
|
1486
|
-
writeServiceToDomain: writeServiceToDomain((0,
|
|
1529
|
+
writeServiceToDomain: writeServiceToDomain((0, import_node_path17.join)(path5, "domains")),
|
|
1487
1530
|
/**
|
|
1488
1531
|
* Returns a service from EventCatalog
|
|
1489
1532
|
* @param id - The id of the service to retrieve
|
|
1490
1533
|
* @param version - Optional id of the version to get (supports semver)
|
|
1491
1534
|
* @returns Service|Undefined
|
|
1492
1535
|
*/
|
|
1493
|
-
getService: getService((0,
|
|
1536
|
+
getService: getService((0, import_node_path17.join)(path5)),
|
|
1494
1537
|
/**
|
|
1495
1538
|
* Returns a service from EventCatalog by it's path.
|
|
1496
1539
|
* @param path - The path to the service to retrieve
|
|
1497
1540
|
* @returns Service|Undefined
|
|
1498
1541
|
*/
|
|
1499
|
-
getServiceByPath: getServiceByPath((0,
|
|
1542
|
+
getServiceByPath: getServiceByPath((0, import_node_path17.join)(path5)),
|
|
1500
1543
|
/**
|
|
1501
1544
|
* Returns all services from EventCatalog
|
|
1502
1545
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1503
1546
|
* @returns Service[]|Undefined
|
|
1504
1547
|
*/
|
|
1505
|
-
getServices: getServices((0,
|
|
1548
|
+
getServices: getServices((0, import_node_path17.join)(path5)),
|
|
1506
1549
|
/**
|
|
1507
1550
|
* Moves a given service id to the version directory
|
|
1508
1551
|
* @param directory
|
|
1509
1552
|
*/
|
|
1510
|
-
versionService: versionService((0,
|
|
1553
|
+
versionService: versionService((0, import_node_path17.join)(path5)),
|
|
1511
1554
|
/**
|
|
1512
1555
|
* Remove a service from EventCatalog (modeled on the standard POSIX rm utility)
|
|
1513
1556
|
*
|
|
1514
1557
|
* @param path - The path to your service, e.g. `/InventoryService`
|
|
1515
1558
|
*
|
|
1516
1559
|
*/
|
|
1517
|
-
rmService: rmService((0,
|
|
1560
|
+
rmService: rmService((0, import_node_path17.join)(path5, "services")),
|
|
1518
1561
|
/**
|
|
1519
1562
|
* Remove an service by an service id
|
|
1520
1563
|
*
|
|
1521
1564
|
* @param id - The id of the service you want to remove
|
|
1522
1565
|
*
|
|
1523
1566
|
*/
|
|
1524
|
-
rmServiceById: rmServiceById((0,
|
|
1567
|
+
rmServiceById: rmServiceById((0, import_node_path17.join)(path5)),
|
|
1525
1568
|
/**
|
|
1526
1569
|
* Adds a file to the given service
|
|
1527
1570
|
* @param id - The id of the service to add the file to
|
|
@@ -1529,21 +1572,21 @@ var index_default = (path5) => {
|
|
|
1529
1572
|
* @param version - Optional version of the service to add the file to
|
|
1530
1573
|
* @returns
|
|
1531
1574
|
*/
|
|
1532
|
-
addFileToService: addFileToService((0,
|
|
1575
|
+
addFileToService: addFileToService((0, import_node_path17.join)(path5)),
|
|
1533
1576
|
/**
|
|
1534
1577
|
* Returns the specifications for a given service
|
|
1535
1578
|
* @param id - The id of the service to retrieve the specifications for
|
|
1536
1579
|
* @param version - Optional version of the service
|
|
1537
1580
|
* @returns
|
|
1538
1581
|
*/
|
|
1539
|
-
getSpecificationFilesForService: getSpecificationFilesForService((0,
|
|
1582
|
+
getSpecificationFilesForService: getSpecificationFilesForService((0, import_node_path17.join)(path5)),
|
|
1540
1583
|
/**
|
|
1541
1584
|
* Check to see if a service version exists
|
|
1542
1585
|
* @param id - The id of the service
|
|
1543
1586
|
* @param version - The version of the service (supports semver)
|
|
1544
1587
|
* @returns
|
|
1545
1588
|
*/
|
|
1546
|
-
serviceHasVersion: serviceHasVersion((0,
|
|
1589
|
+
serviceHasVersion: serviceHasVersion((0, import_node_path17.join)(path5)),
|
|
1547
1590
|
/**
|
|
1548
1591
|
* Add an event to a service by it's id.
|
|
1549
1592
|
*
|
|
@@ -1563,7 +1606,7 @@ var index_default = (path5) => {
|
|
|
1563
1606
|
*
|
|
1564
1607
|
* ```
|
|
1565
1608
|
*/
|
|
1566
|
-
addEventToService: addMessageToService((0,
|
|
1609
|
+
addEventToService: addMessageToService((0, import_node_path17.join)(path5)),
|
|
1567
1610
|
/**
|
|
1568
1611
|
* Add a command to a service by it's id.
|
|
1569
1612
|
*
|
|
@@ -1583,7 +1626,7 @@ var index_default = (path5) => {
|
|
|
1583
1626
|
*
|
|
1584
1627
|
* ```
|
|
1585
1628
|
*/
|
|
1586
|
-
addCommandToService: addMessageToService((0,
|
|
1629
|
+
addCommandToService: addMessageToService((0, import_node_path17.join)(path5)),
|
|
1587
1630
|
/**
|
|
1588
1631
|
* Add a query to a service by it's id.
|
|
1589
1632
|
*
|
|
@@ -1603,7 +1646,7 @@ var index_default = (path5) => {
|
|
|
1603
1646
|
*
|
|
1604
1647
|
* ```
|
|
1605
1648
|
*/
|
|
1606
|
-
addQueryToService: addMessageToService((0,
|
|
1649
|
+
addQueryToService: addMessageToService((0, import_node_path17.join)(path5)),
|
|
1607
1650
|
/**
|
|
1608
1651
|
* Add an entity to a service by its id.
|
|
1609
1652
|
*
|
|
@@ -1621,7 +1664,7 @@ var index_default = (path5) => {
|
|
|
1621
1664
|
*
|
|
1622
1665
|
* ```
|
|
1623
1666
|
*/
|
|
1624
|
-
addEntityToService: addEntityToService((0,
|
|
1667
|
+
addEntityToService: addEntityToService((0, import_node_path17.join)(path5)),
|
|
1625
1668
|
/**
|
|
1626
1669
|
* Check to see if a service exists by it's path.
|
|
1627
1670
|
*
|
|
@@ -1638,13 +1681,13 @@ var index_default = (path5) => {
|
|
|
1638
1681
|
* @param path - The path to the service to check
|
|
1639
1682
|
* @returns boolean
|
|
1640
1683
|
*/
|
|
1641
|
-
isService: isService((0,
|
|
1684
|
+
isService: isService((0, import_node_path17.join)(path5)),
|
|
1642
1685
|
/**
|
|
1643
1686
|
* Converts a file to a service.
|
|
1644
1687
|
* @param file - The file to convert to a service.
|
|
1645
1688
|
* @returns The service.
|
|
1646
1689
|
*/
|
|
1647
|
-
toService: toService((0,
|
|
1690
|
+
toService: toService((0, import_node_path17.join)(path5)),
|
|
1648
1691
|
/**
|
|
1649
1692
|
* ================================
|
|
1650
1693
|
* Domains
|
|
@@ -1657,39 +1700,39 @@ var index_default = (path5) => {
|
|
|
1657
1700
|
* @param options - Optional options to write the event
|
|
1658
1701
|
*
|
|
1659
1702
|
*/
|
|
1660
|
-
writeDomain: writeDomain((0,
|
|
1703
|
+
writeDomain: writeDomain((0, import_node_path17.join)(path5, "domains")),
|
|
1661
1704
|
/**
|
|
1662
1705
|
* Returns a domain from EventCatalog
|
|
1663
1706
|
* @param id - The id of the domain to retrieve
|
|
1664
1707
|
* @param version - Optional id of the version to get (supports semver)
|
|
1665
1708
|
* @returns Domain|Undefined
|
|
1666
1709
|
*/
|
|
1667
|
-
getDomain: getDomain((0,
|
|
1710
|
+
getDomain: getDomain((0, import_node_path17.join)(path5, "domains")),
|
|
1668
1711
|
/**
|
|
1669
1712
|
* Returns all domains from EventCatalog
|
|
1670
1713
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1671
1714
|
* @returns Domain[]|Undefined
|
|
1672
1715
|
*/
|
|
1673
|
-
getDomains: getDomains((0,
|
|
1716
|
+
getDomains: getDomains((0, import_node_path17.join)(path5)),
|
|
1674
1717
|
/**
|
|
1675
1718
|
* Moves a given domain id to the version directory
|
|
1676
1719
|
* @param directory
|
|
1677
1720
|
*/
|
|
1678
|
-
versionDomain: versionDomain((0,
|
|
1721
|
+
versionDomain: versionDomain((0, import_node_path17.join)(path5, "domains")),
|
|
1679
1722
|
/**
|
|
1680
1723
|
* Remove a domain from EventCatalog (modeled on the standard POSIX rm utility)
|
|
1681
1724
|
*
|
|
1682
1725
|
* @param path - The path to your domain, e.g. `/Payment`
|
|
1683
1726
|
*
|
|
1684
1727
|
*/
|
|
1685
|
-
rmDomain: rmDomain((0,
|
|
1728
|
+
rmDomain: rmDomain((0, import_node_path17.join)(path5, "domains")),
|
|
1686
1729
|
/**
|
|
1687
1730
|
* Remove an service by an domain id
|
|
1688
1731
|
*
|
|
1689
1732
|
* @param id - The id of the domain you want to remove
|
|
1690
1733
|
*
|
|
1691
1734
|
*/
|
|
1692
|
-
rmDomainById: rmDomainById((0,
|
|
1735
|
+
rmDomainById: rmDomainById((0, import_node_path17.join)(path5, "domains")),
|
|
1693
1736
|
/**
|
|
1694
1737
|
* Adds a file to the given domain
|
|
1695
1738
|
* @param id - The id of the domain to add the file to
|
|
@@ -1697,28 +1740,28 @@ var index_default = (path5) => {
|
|
|
1697
1740
|
* @param version - Optional version of the domain to add the file to
|
|
1698
1741
|
* @returns
|
|
1699
1742
|
*/
|
|
1700
|
-
addFileToDomain: addFileToDomain((0,
|
|
1743
|
+
addFileToDomain: addFileToDomain((0, import_node_path17.join)(path5, "domains")),
|
|
1701
1744
|
/**
|
|
1702
1745
|
* Adds an ubiquitous language dictionary to a domain
|
|
1703
1746
|
* @param id - The id of the domain to add the ubiquitous language to
|
|
1704
1747
|
* @param ubiquitousLanguageDictionary - The ubiquitous language dictionary to add
|
|
1705
1748
|
* @param version - Optional version of the domain to add the ubiquitous language to
|
|
1706
1749
|
*/
|
|
1707
|
-
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain((0,
|
|
1750
|
+
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain((0, import_node_path17.join)(path5, "domains")),
|
|
1708
1751
|
/**
|
|
1709
1752
|
* Get the ubiquitous language dictionary from a domain
|
|
1710
1753
|
* @param id - The id of the domain to get the ubiquitous language from
|
|
1711
1754
|
* @param version - Optional version of the domain to get the ubiquitous language from
|
|
1712
1755
|
* @returns
|
|
1713
1756
|
*/
|
|
1714
|
-
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain((0,
|
|
1757
|
+
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain((0, import_node_path17.join)(path5, "domains")),
|
|
1715
1758
|
/**
|
|
1716
1759
|
* Check to see if a domain version exists
|
|
1717
1760
|
* @param id - The id of the domain
|
|
1718
1761
|
* @param version - The version of the domain (supports semver)
|
|
1719
1762
|
* @returns
|
|
1720
1763
|
*/
|
|
1721
|
-
domainHasVersion: domainHasVersion((0,
|
|
1764
|
+
domainHasVersion: domainHasVersion((0, import_node_path17.join)(path5)),
|
|
1722
1765
|
/**
|
|
1723
1766
|
* Adds a given service to a domain
|
|
1724
1767
|
* @param id - The id of the domain
|
|
@@ -1726,7 +1769,7 @@ var index_default = (path5) => {
|
|
|
1726
1769
|
* @param version - (Optional) The version of the domain to add the service to
|
|
1727
1770
|
* @returns
|
|
1728
1771
|
*/
|
|
1729
|
-
addServiceToDomain: addServiceToDomain((0,
|
|
1772
|
+
addServiceToDomain: addServiceToDomain((0, import_node_path17.join)(path5, "domains")),
|
|
1730
1773
|
/**
|
|
1731
1774
|
* Adds a given subdomain to a domain
|
|
1732
1775
|
* @param id - The id of the domain
|
|
@@ -1734,7 +1777,7 @@ var index_default = (path5) => {
|
|
|
1734
1777
|
* @param version - (Optional) The version of the domain to add the subdomain to
|
|
1735
1778
|
* @returns
|
|
1736
1779
|
*/
|
|
1737
|
-
addSubDomainToDomain: addSubDomainToDomain((0,
|
|
1780
|
+
addSubDomainToDomain: addSubDomainToDomain((0, import_node_path17.join)(path5, "domains")),
|
|
1738
1781
|
/**
|
|
1739
1782
|
* Adds an entity to a domain
|
|
1740
1783
|
* @param id - The id of the domain
|
|
@@ -1742,7 +1785,7 @@ var index_default = (path5) => {
|
|
|
1742
1785
|
* @param version - (Optional) The version of the domain to add the entity to
|
|
1743
1786
|
* @returns
|
|
1744
1787
|
*/
|
|
1745
|
-
addEntityToDomain: addEntityToDomain((0,
|
|
1788
|
+
addEntityToDomain: addEntityToDomain((0, import_node_path17.join)(path5, "domains")),
|
|
1746
1789
|
/**
|
|
1747
1790
|
* ================================
|
|
1748
1791
|
* Teams
|
|
@@ -1755,25 +1798,25 @@ var index_default = (path5) => {
|
|
|
1755
1798
|
* @param options - Optional options to write the team
|
|
1756
1799
|
*
|
|
1757
1800
|
*/
|
|
1758
|
-
writeTeam: writeTeam((0,
|
|
1801
|
+
writeTeam: writeTeam((0, import_node_path17.join)(path5, "teams")),
|
|
1759
1802
|
/**
|
|
1760
1803
|
* Returns a team from EventCatalog
|
|
1761
1804
|
* @param id - The id of the team to retrieve
|
|
1762
1805
|
* @returns Team|Undefined
|
|
1763
1806
|
*/
|
|
1764
|
-
getTeam: getTeam((0,
|
|
1807
|
+
getTeam: getTeam((0, import_node_path17.join)(path5, "teams")),
|
|
1765
1808
|
/**
|
|
1766
1809
|
* Returns all teams from EventCatalog
|
|
1767
1810
|
* @returns Team[]|Undefined
|
|
1768
1811
|
*/
|
|
1769
|
-
getTeams: getTeams((0,
|
|
1812
|
+
getTeams: getTeams((0, import_node_path17.join)(path5, "teams")),
|
|
1770
1813
|
/**
|
|
1771
1814
|
* Remove a team by the team id
|
|
1772
1815
|
*
|
|
1773
1816
|
* @param id - The id of the team you want to remove
|
|
1774
1817
|
*
|
|
1775
1818
|
*/
|
|
1776
|
-
rmTeamById: rmTeamById((0,
|
|
1819
|
+
rmTeamById: rmTeamById((0, import_node_path17.join)(path5, "teams")),
|
|
1777
1820
|
/**
|
|
1778
1821
|
* ================================
|
|
1779
1822
|
* Users
|
|
@@ -1786,25 +1829,25 @@ var index_default = (path5) => {
|
|
|
1786
1829
|
* @param options - Optional options to write the user
|
|
1787
1830
|
*
|
|
1788
1831
|
*/
|
|
1789
|
-
writeUser: writeUser((0,
|
|
1832
|
+
writeUser: writeUser((0, import_node_path17.join)(path5, "users")),
|
|
1790
1833
|
/**
|
|
1791
1834
|
* Returns a user from EventCatalog
|
|
1792
1835
|
* @param id - The id of the user to retrieve
|
|
1793
1836
|
* @returns User|Undefined
|
|
1794
1837
|
*/
|
|
1795
|
-
getUser: getUser((0,
|
|
1838
|
+
getUser: getUser((0, import_node_path17.join)(path5, "users")),
|
|
1796
1839
|
/**
|
|
1797
1840
|
* Returns all user from EventCatalog
|
|
1798
1841
|
* @returns User[]|Undefined
|
|
1799
1842
|
*/
|
|
1800
|
-
getUsers: getUsers((0,
|
|
1843
|
+
getUsers: getUsers((0, import_node_path17.join)(path5)),
|
|
1801
1844
|
/**
|
|
1802
1845
|
* Remove a user by the user id
|
|
1803
1846
|
*
|
|
1804
1847
|
* @param id - The id of the user you want to remove
|
|
1805
1848
|
*
|
|
1806
1849
|
*/
|
|
1807
|
-
rmUserById: rmUserById((0,
|
|
1850
|
+
rmUserById: rmUserById((0, import_node_path17.join)(path5, "users")),
|
|
1808
1851
|
/**
|
|
1809
1852
|
* ================================
|
|
1810
1853
|
* Custom Docs
|
|
@@ -1815,32 +1858,32 @@ var index_default = (path5) => {
|
|
|
1815
1858
|
* @param path - The path to the custom doc to retrieve
|
|
1816
1859
|
* @returns CustomDoc|Undefined
|
|
1817
1860
|
*/
|
|
1818
|
-
getCustomDoc: getCustomDoc((0,
|
|
1861
|
+
getCustomDoc: getCustomDoc((0, import_node_path17.join)(path5, "docs")),
|
|
1819
1862
|
/**
|
|
1820
1863
|
* Returns all custom docs from EventCatalog
|
|
1821
1864
|
* @param options - Optional options to get custom docs from a specific path
|
|
1822
1865
|
* @returns CustomDoc[]|Undefined
|
|
1823
1866
|
*/
|
|
1824
|
-
getCustomDocs: getCustomDocs((0,
|
|
1867
|
+
getCustomDocs: getCustomDocs((0, import_node_path17.join)(path5, "docs")),
|
|
1825
1868
|
/**
|
|
1826
1869
|
* Writes a custom doc to EventCatalog
|
|
1827
1870
|
* @param customDoc - The custom doc to write
|
|
1828
1871
|
* @param options - Optional options to write the custom doc
|
|
1829
1872
|
*
|
|
1830
1873
|
*/
|
|
1831
|
-
writeCustomDoc: writeCustomDoc((0,
|
|
1874
|
+
writeCustomDoc: writeCustomDoc((0, import_node_path17.join)(path5, "docs")),
|
|
1832
1875
|
/**
|
|
1833
1876
|
* Removes a custom doc from EventCatalog
|
|
1834
1877
|
* @param path - The path to the custom doc to remove
|
|
1835
1878
|
*
|
|
1836
1879
|
*/
|
|
1837
|
-
rmCustomDoc: rmCustomDoc((0,
|
|
1880
|
+
rmCustomDoc: rmCustomDoc((0, import_node_path17.join)(path5, "docs")),
|
|
1838
1881
|
/**
|
|
1839
1882
|
* Dumps the catalog to a JSON file.
|
|
1840
1883
|
* @param directory - The directory to dump the catalog to
|
|
1841
1884
|
* @returns A JSON file with the catalog
|
|
1842
1885
|
*/
|
|
1843
|
-
dumpCatalog: dumpCatalog((0,
|
|
1886
|
+
dumpCatalog: dumpCatalog((0, import_node_path17.join)(path5)),
|
|
1844
1887
|
/**
|
|
1845
1888
|
* Returns the event catalog configuration file.
|
|
1846
1889
|
* The event catalog configuration file is the file that contains the configuration for the event catalog.
|
|
@@ -1848,7 +1891,7 @@ var index_default = (path5) => {
|
|
|
1848
1891
|
* @param directory - The directory of the catalog.
|
|
1849
1892
|
* @returns A JSON object with the configuration for the event catalog.
|
|
1850
1893
|
*/
|
|
1851
|
-
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile((0,
|
|
1894
|
+
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile((0, import_node_path17.join)(path5)),
|
|
1852
1895
|
/**
|
|
1853
1896
|
* ================================
|
|
1854
1897
|
* Resources Utils
|
|
@@ -1869,33 +1912,33 @@ var index_default = (path5) => {
|
|
|
1869
1912
|
* @param path - The path to the message to retrieve
|
|
1870
1913
|
* @returns Message|Undefined
|
|
1871
1914
|
*/
|
|
1872
|
-
getMessageBySchemaPath: getMessageBySchemaPath((0,
|
|
1915
|
+
getMessageBySchemaPath: getMessageBySchemaPath((0, import_node_path17.join)(path5)),
|
|
1873
1916
|
/**
|
|
1874
1917
|
* Returns the producers and consumers (services) for a given message
|
|
1875
1918
|
* @param id - The id of the message to get the producers and consumers for
|
|
1876
1919
|
* @param version - Optional version of the message
|
|
1877
1920
|
* @returns { producers: Service[], consumers: Service[] }
|
|
1878
1921
|
*/
|
|
1879
|
-
getProducersAndConsumersForMessage: getProducersAndConsumersForMessage((0,
|
|
1922
|
+
getProducersAndConsumersForMessage: getProducersAndConsumersForMessage((0, import_node_path17.join)(path5)),
|
|
1880
1923
|
/**
|
|
1881
1924
|
* Returns the consumers of a given schema path
|
|
1882
1925
|
* @param path - The path to the schema to get the consumers for
|
|
1883
1926
|
* @returns Service[]
|
|
1884
1927
|
*/
|
|
1885
|
-
getConsumersOfSchema: getConsumersOfSchema((0,
|
|
1928
|
+
getConsumersOfSchema: getConsumersOfSchema((0, import_node_path17.join)(path5)),
|
|
1886
1929
|
/**
|
|
1887
1930
|
* Returns the producers of a given schema path
|
|
1888
1931
|
* @param path - The path to the schema to get the producers for
|
|
1889
1932
|
* @returns Service[]
|
|
1890
1933
|
*/
|
|
1891
|
-
getProducersOfSchema: getProducersOfSchema((0,
|
|
1934
|
+
getProducersOfSchema: getProducersOfSchema((0, import_node_path17.join)(path5)),
|
|
1892
1935
|
/**
|
|
1893
1936
|
* Returns the owners for a given resource (e.g domain, service, event, command, query, etc.)
|
|
1894
1937
|
* @param id - The id of the resource to get the owners for
|
|
1895
1938
|
* @param version - Optional version of the resource
|
|
1896
1939
|
* @returns { owners: User[] }
|
|
1897
1940
|
*/
|
|
1898
|
-
getOwnersForResource: getOwnersForResource((0,
|
|
1941
|
+
getOwnersForResource: getOwnersForResource((0, import_node_path17.join)(path5)),
|
|
1899
1942
|
/**
|
|
1900
1943
|
* ================================
|
|
1901
1944
|
* Entities
|
|
@@ -1907,13 +1950,13 @@ var index_default = (path5) => {
|
|
|
1907
1950
|
* @param version - Optional id of the version to get (supports semver)
|
|
1908
1951
|
* @returns Entity|Undefined
|
|
1909
1952
|
*/
|
|
1910
|
-
getEntity: getEntity((0,
|
|
1953
|
+
getEntity: getEntity((0, import_node_path17.join)(path5)),
|
|
1911
1954
|
/**
|
|
1912
1955
|
* Returns all entities from EventCatalog
|
|
1913
1956
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1914
1957
|
* @returns Entity[]|Undefined
|
|
1915
1958
|
*/
|
|
1916
|
-
getEntities: getEntities((0,
|
|
1959
|
+
getEntities: getEntities((0, import_node_path17.join)(path5)),
|
|
1917
1960
|
/**
|
|
1918
1961
|
* Adds an entity to EventCatalog
|
|
1919
1962
|
*
|
|
@@ -1921,33 +1964,95 @@ var index_default = (path5) => {
|
|
|
1921
1964
|
* @param options - Optional options to write the entity
|
|
1922
1965
|
*
|
|
1923
1966
|
*/
|
|
1924
|
-
writeEntity: writeEntity((0,
|
|
1967
|
+
writeEntity: writeEntity((0, import_node_path17.join)(path5, "entities")),
|
|
1925
1968
|
/**
|
|
1926
1969
|
* Remove an entity from EventCatalog (modeled on the standard POSIX rm utility)
|
|
1927
1970
|
*
|
|
1928
1971
|
* @param path - The path to your entity, e.g. `/User`
|
|
1929
1972
|
*
|
|
1930
1973
|
*/
|
|
1931
|
-
rmEntity: rmEntity((0,
|
|
1974
|
+
rmEntity: rmEntity((0, import_node_path17.join)(path5, "entities")),
|
|
1932
1975
|
/**
|
|
1933
1976
|
* Remove an entity by an entity id
|
|
1934
1977
|
*
|
|
1935
1978
|
* @param id - The id of the entity you want to remove
|
|
1936
1979
|
*
|
|
1937
1980
|
*/
|
|
1938
|
-
rmEntityById: rmEntityById((0,
|
|
1981
|
+
rmEntityById: rmEntityById((0, import_node_path17.join)(path5)),
|
|
1939
1982
|
/**
|
|
1940
1983
|
* Moves a given entity id to the version directory
|
|
1941
1984
|
* @param id - The id of the entity to version
|
|
1942
1985
|
*/
|
|
1943
|
-
versionEntity: versionEntity((0,
|
|
1986
|
+
versionEntity: versionEntity((0, import_node_path17.join)(path5)),
|
|
1944
1987
|
/**
|
|
1945
1988
|
* Check to see if an entity version exists
|
|
1946
1989
|
* @param id - The id of the entity
|
|
1947
1990
|
* @param version - The version of the entity (supports semver)
|
|
1948
1991
|
* @returns
|
|
1949
1992
|
*/
|
|
1950
|
-
entityHasVersion: entityHasVersion((0,
|
|
1993
|
+
entityHasVersion: entityHasVersion((0, import_node_path17.join)(path5)),
|
|
1994
|
+
/**
|
|
1995
|
+
* ================================
|
|
1996
|
+
* Data Stores
|
|
1997
|
+
* ================================
|
|
1998
|
+
*/
|
|
1999
|
+
/**
|
|
2000
|
+
* Adds a data store to EventCatalog
|
|
2001
|
+
* @param dataStore - The data store to write
|
|
2002
|
+
* @param options - Optional options to write the data store
|
|
2003
|
+
*
|
|
2004
|
+
*/
|
|
2005
|
+
writeDataStore: writeDataStore((0, import_node_path17.join)(path5, "containers")),
|
|
2006
|
+
/**
|
|
2007
|
+
* Returns a data store from EventCatalog
|
|
2008
|
+
* @param id - The id of the data store to retrieve
|
|
2009
|
+
* @param version - Optional id of the version to get (supports semver)
|
|
2010
|
+
* @returns Container|Undefined
|
|
2011
|
+
*/
|
|
2012
|
+
getDataStore: getDataStore((0, import_node_path17.join)(path5)),
|
|
2013
|
+
/**
|
|
2014
|
+
* Returns all data stores from EventCatalog
|
|
2015
|
+
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
2016
|
+
* @returns Container[]|Undefined
|
|
2017
|
+
*/
|
|
2018
|
+
getDataStores: getDataStores((0, import_node_path17.join)(path5)),
|
|
2019
|
+
/**
|
|
2020
|
+
* Version a data store by its id
|
|
2021
|
+
* @param id - The id of the data store to version
|
|
2022
|
+
*/
|
|
2023
|
+
versionDataStore: versionDataStore((0, import_node_path17.join)(path5, "containers")),
|
|
2024
|
+
/**
|
|
2025
|
+
* Remove a data store by its path
|
|
2026
|
+
* @param path - The path to the data store to remove
|
|
2027
|
+
*/
|
|
2028
|
+
rmDataStore: rmDataStore((0, import_node_path17.join)(path5, "containers")),
|
|
2029
|
+
/**
|
|
2030
|
+
* Remove a data store by its id
|
|
2031
|
+
* @param id - The id of the data store to remove
|
|
2032
|
+
*/
|
|
2033
|
+
rmDataStoreById: rmDataStoreById((0, import_node_path17.join)(path5)),
|
|
2034
|
+
/**
|
|
2035
|
+
* Check to see if a data store version exists
|
|
2036
|
+
* @param id - The id of the data store
|
|
2037
|
+
* @param version - The version of the data store (supports semver)
|
|
2038
|
+
* @returns
|
|
2039
|
+
*/
|
|
2040
|
+
dataStoreHasVersion: dataStoreHasVersion((0, import_node_path17.join)(path5)),
|
|
2041
|
+
/**
|
|
2042
|
+
* Adds a file to a data store by its id
|
|
2043
|
+
* @param id - The id of the data store to add the file to
|
|
2044
|
+
* @param file - File contents to add including the content and the file name
|
|
2045
|
+
* @param version - Optional version of the data store to add the file to
|
|
2046
|
+
* @returns
|
|
2047
|
+
*/
|
|
2048
|
+
addFileToDataStore: addFileToDataStore((0, import_node_path17.join)(path5)),
|
|
2049
|
+
/**
|
|
2050
|
+
* Writes a data store to a service by its id
|
|
2051
|
+
* @param dataStore - The data store to write
|
|
2052
|
+
* @param service - The service to write the data store to
|
|
2053
|
+
* @returns
|
|
2054
|
+
*/
|
|
2055
|
+
writeDataStoreToService: writeDataStoreToService((0, import_node_path17.join)(path5))
|
|
1951
2056
|
};
|
|
1952
2057
|
};
|
|
1953
2058
|
//# sourceMappingURL=index.js.map
|