@eventcatalog/sdk 2.1.0 → 2.1.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/domains.d.mts +41 -2
- package/dist/domains.d.ts +41 -2
- package/dist/domains.js +36 -9
- package/dist/domains.js.map +1 -1
- package/dist/domains.mjs +34 -9
- package/dist/domains.mjs.map +1 -1
- package/dist/index.d.mts +19 -15
- package/dist/index.d.ts +19 -15
- package/dist/index.js +156 -124
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +159 -127
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.d.mts +13 -1
- package/dist/types.d.d.ts +13 -1
- package/dist/types.d.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -54,13 +54,13 @@ var versionExists = async (catalogDir, id, version) => {
|
|
|
54
54
|
var findFileById = async (catalogDir, id, version) => {
|
|
55
55
|
const files = await getFiles(`${catalogDir}/**/index.{md,mdx}`);
|
|
56
56
|
const matchedFiles = await searchFilesForId(files, id) || [];
|
|
57
|
-
const latestVersion = matchedFiles.find((
|
|
57
|
+
const latestVersion = matchedFiles.find((path3) => !path3.includes("versioned"));
|
|
58
58
|
if (!version) {
|
|
59
59
|
return latestVersion;
|
|
60
60
|
}
|
|
61
|
-
const parsedFiles = matchedFiles.map((
|
|
62
|
-
const { data } = import_gray_matter.default.read(
|
|
63
|
-
return { ...data, path:
|
|
61
|
+
const parsedFiles = matchedFiles.map((path3) => {
|
|
62
|
+
const { data } = import_gray_matter.default.read(path3);
|
|
63
|
+
return { ...data, path: path3 };
|
|
64
64
|
});
|
|
65
65
|
const semverRange = (0, import_semver.validRange)(version);
|
|
66
66
|
if (semverRange && (0, import_semver.valid)(version)) {
|
|
@@ -84,8 +84,8 @@ var getFiles = async (pattern, ignore = "") => {
|
|
|
84
84
|
throw new Error(`Error finding files: ${error}`);
|
|
85
85
|
}
|
|
86
86
|
};
|
|
87
|
-
var readMdxFile = async (
|
|
88
|
-
const { data } = import_gray_matter.default.read(
|
|
87
|
+
var readMdxFile = async (path3) => {
|
|
88
|
+
const { data } = import_gray_matter.default.read(path3);
|
|
89
89
|
const { markdown, ...frontmatter } = data;
|
|
90
90
|
return { ...frontmatter, markdown };
|
|
91
91
|
};
|
|
@@ -166,8 +166,8 @@ var writeResource = async (catalogDir, resource, options = {
|
|
|
166
166
|
override: false,
|
|
167
167
|
versionExistingContent: false
|
|
168
168
|
}) => {
|
|
169
|
-
const
|
|
170
|
-
const fullPath = (0, import_path.join)(catalogDir,
|
|
169
|
+
const path3 = options.path || `/${resource.id}`;
|
|
170
|
+
const fullPath = (0, import_path.join)(catalogDir, path3);
|
|
171
171
|
import_node_fs2.default.mkdirSync(fullPath, { recursive: true });
|
|
172
172
|
const lockPath = (0, import_path.join)(fullPath, "index.mdx");
|
|
173
173
|
if (!import_node_fs2.default.existsSync(lockPath)) {
|
|
@@ -274,8 +274,8 @@ var writeEventToService = (directory) => async (event, service, options = { path
|
|
|
274
274
|
pathForEvent = (0, import_node_path2.join)(pathForEvent, event.id);
|
|
275
275
|
await writeResource(directory, { ...event }, { ...options, path: pathForEvent, type: "event" });
|
|
276
276
|
};
|
|
277
|
-
var rmEvent = (directory) => async (
|
|
278
|
-
await import_promises2.default.rm((0, import_node_path2.join)(directory,
|
|
277
|
+
var rmEvent = (directory) => async (path3) => {
|
|
278
|
+
await import_promises2.default.rm((0, import_node_path2.join)(directory, path3), { recursive: true });
|
|
279
279
|
};
|
|
280
280
|
var rmEventById = (directory) => async (id, version, persistFiles) => {
|
|
281
281
|
await rmResourceById(directory, id, version, { type: "event", persistFiles });
|
|
@@ -301,8 +301,8 @@ var writeCommandToService = (directory) => async (command, service, options = {
|
|
|
301
301
|
pathForEvent = (0, import_node_path3.join)(pathForEvent, command.id);
|
|
302
302
|
await writeResource(directory, { ...command }, { ...options, path: pathForEvent, type: "command" });
|
|
303
303
|
};
|
|
304
|
-
var rmCommand = (directory) => async (
|
|
305
|
-
await import_promises3.default.rm((0, import_node_path3.join)(directory,
|
|
304
|
+
var rmCommand = (directory) => async (path3) => {
|
|
305
|
+
await import_promises3.default.rm((0, import_node_path3.join)(directory, path3), { recursive: true });
|
|
306
306
|
};
|
|
307
307
|
var rmCommandById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "command", persistFiles });
|
|
308
308
|
var versionCommand = (directory) => async (id) => versionResource(directory, id);
|
|
@@ -326,8 +326,8 @@ var writeQueryToService = (directory) => async (query, service, options = { path
|
|
|
326
326
|
pathForQuery = (0, import_node_path4.join)(pathForQuery, query.id);
|
|
327
327
|
await writeResource(directory, { ...query }, { ...options, path: pathForQuery, type: "query" });
|
|
328
328
|
};
|
|
329
|
-
var rmQuery = (directory) => async (
|
|
330
|
-
await import_promises4.default.rm((0, import_node_path4.join)(directory,
|
|
329
|
+
var rmQuery = (directory) => async (path3) => {
|
|
330
|
+
await import_promises4.default.rm((0, import_node_path4.join)(directory, path3), { recursive: true });
|
|
331
331
|
};
|
|
332
332
|
var rmQueryById = (directory) => async (id, version, persistFiles) => {
|
|
333
333
|
await rmResourceById(directory, id, version, { type: "query", persistFiles });
|
|
@@ -363,8 +363,8 @@ var writeService = (directory) => async (service, options = { path: "" }) => {
|
|
|
363
363
|
};
|
|
364
364
|
var writeVersionedService = (directory) => async (service) => {
|
|
365
365
|
const resource = { ...service };
|
|
366
|
-
const
|
|
367
|
-
return await writeService(directory)(resource, { path:
|
|
366
|
+
const path3 = getVersionedDirectory(service.id, service.version);
|
|
367
|
+
return await writeService(directory)(resource, { path: path3 });
|
|
368
368
|
};
|
|
369
369
|
var writeServiceToDomain = (directory) => async (service, domain, options = { path: "" }) => {
|
|
370
370
|
let pathForService = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/services` : `/${domain.id}/services`;
|
|
@@ -372,8 +372,8 @@ var writeServiceToDomain = (directory) => async (service, domain, options = { pa
|
|
|
372
372
|
await writeResource(directory, { ...service }, { ...options, path: pathForService, type: "service" });
|
|
373
373
|
};
|
|
374
374
|
var versionService = (directory) => async (id) => versionResource(directory, id);
|
|
375
|
-
var rmService = (directory) => async (
|
|
376
|
-
await import_promises5.default.rm((0, import_node_path5.join)(directory,
|
|
375
|
+
var rmService = (directory) => async (path3) => {
|
|
376
|
+
await import_promises5.default.rm((0, import_node_path5.join)(directory, path3), { recursive: true });
|
|
377
377
|
};
|
|
378
378
|
var rmServiceById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "service", persistFiles });
|
|
379
379
|
var addFileToService = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
|
|
@@ -426,8 +426,8 @@ var addMessageToService = (directory) => async (id, direction, event, version) =
|
|
|
426
426
|
if (!existingResource) {
|
|
427
427
|
throw new Error(`Cannot find service ${id} in the catalog`);
|
|
428
428
|
}
|
|
429
|
-
const
|
|
430
|
-
const pathToResource = (0, import_node_path5.join)(
|
|
429
|
+
const path3 = existingResource.split("/services")[0];
|
|
430
|
+
const pathToResource = (0, import_node_path5.join)(path3, "services");
|
|
431
431
|
await rmServiceById(directory)(id, version);
|
|
432
432
|
await writeService(pathToResource)(service);
|
|
433
433
|
};
|
|
@@ -438,7 +438,9 @@ var serviceHasVersion = (directory) => async (id, version) => {
|
|
|
438
438
|
|
|
439
439
|
// src/domains.ts
|
|
440
440
|
var import_promises6 = __toESM(require("fs/promises"));
|
|
441
|
-
var import_node_path6 = require("path");
|
|
441
|
+
var import_node_path6 = __toESM(require("path"));
|
|
442
|
+
var import_node_fs3 = __toESM(require("fs"));
|
|
443
|
+
var import_gray_matter3 = __toESM(require("gray-matter"));
|
|
442
444
|
var getDomain = (directory) => async (id, version) => getResource(directory, id, version, { type: "domain" });
|
|
443
445
|
var getDomains = (directory) => async (options) => getResources(directory, {
|
|
444
446
|
type: "domains",
|
|
@@ -453,11 +455,27 @@ var writeDomain = (directory) => async (domain, options = { path: "" }) => {
|
|
|
453
455
|
return await writeResource(directory, resource, { ...options, type: "domain" });
|
|
454
456
|
};
|
|
455
457
|
var versionDomain = (directory) => async (id) => versionResource(directory, id);
|
|
456
|
-
var rmDomain = (directory) => async (
|
|
457
|
-
await import_promises6.default.rm((0, import_node_path6.join)(directory,
|
|
458
|
+
var rmDomain = (directory) => async (path3) => {
|
|
459
|
+
await import_promises6.default.rm((0, import_node_path6.join)(directory, path3), { recursive: true });
|
|
458
460
|
};
|
|
459
461
|
var rmDomainById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "domain", persistFiles });
|
|
460
462
|
var addFileToDomain = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
|
|
463
|
+
var addUbiquitousLanguageToDomain = (directory) => async (id, ubiquitousLanguageDictionary, version) => {
|
|
464
|
+
const content = import_gray_matter3.default.stringify("", {
|
|
465
|
+
...ubiquitousLanguageDictionary
|
|
466
|
+
});
|
|
467
|
+
await addFileToResource(directory, id, { content, fileName: "ubiquitous-language.mdx" }, version);
|
|
468
|
+
};
|
|
469
|
+
var getUbiquitousLanguageFromDomain = (directory) => async (id, version) => {
|
|
470
|
+
const pathToDomain = await findFileById(directory, id, version) || "";
|
|
471
|
+
const pathToUbiquitousLanguage = import_node_path6.default.join(import_node_path6.default.dirname(pathToDomain), "ubiquitous-language.mdx");
|
|
472
|
+
const fileExists = import_node_fs3.default.existsSync(pathToUbiquitousLanguage);
|
|
473
|
+
if (!fileExists) {
|
|
474
|
+
return void 0;
|
|
475
|
+
}
|
|
476
|
+
const content = await readMdxFile(pathToUbiquitousLanguage);
|
|
477
|
+
return content;
|
|
478
|
+
};
|
|
461
479
|
var domainHasVersion = (directory) => async (id, version) => {
|
|
462
480
|
const file = await findFileById(directory, id, version);
|
|
463
481
|
return !!file;
|
|
@@ -482,8 +500,8 @@ var import_node_path7 = require("path");
|
|
|
482
500
|
var getChannel = (directory) => async (id, version) => getResource(directory, id, version, { type: "channel" });
|
|
483
501
|
var getChannels = (directory) => async (options) => getResources(directory, { type: "channels", ...options });
|
|
484
502
|
var writeChannel = (directory) => async (channel, options = { path: "" }) => writeResource(directory, { ...channel }, { ...options, type: "channel" });
|
|
485
|
-
var rmChannel = (directory) => async (
|
|
486
|
-
await import_promises7.default.rm((0, import_node_path7.join)(directory,
|
|
503
|
+
var rmChannel = (directory) => async (path3) => {
|
|
504
|
+
await import_promises7.default.rm((0, import_node_path7.join)(directory, path3), { recursive: true });
|
|
487
505
|
};
|
|
488
506
|
var rmChannelById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "channel", persistFiles });
|
|
489
507
|
var versionChannel = (directory) => async (id) => versionResource(directory, id);
|
|
@@ -522,22 +540,22 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
|
|
|
522
540
|
if (!existingResource) {
|
|
523
541
|
throw new Error(`Cannot find message ${id} in the catalog`);
|
|
524
542
|
}
|
|
525
|
-
const
|
|
526
|
-
const pathToResource = (0, import_node_path7.join)(
|
|
543
|
+
const path3 = existingResource.split(`/${collection}`)[0];
|
|
544
|
+
const pathToResource = (0, import_node_path7.join)(path3, collection);
|
|
527
545
|
await rmMessageById(directory)(_message.id, _message.version, true);
|
|
528
546
|
await writeMessage(pathToResource)(message);
|
|
529
547
|
};
|
|
530
548
|
|
|
531
549
|
// src/custom-docs.ts
|
|
532
550
|
var import_node_path8 = __toESM(require("path"));
|
|
533
|
-
var
|
|
551
|
+
var import_node_fs4 = __toESM(require("fs"));
|
|
534
552
|
var import_promises8 = __toESM(require("fs/promises"));
|
|
535
|
-
var
|
|
553
|
+
var import_gray_matter4 = __toESM(require("gray-matter"));
|
|
536
554
|
var import_slugify = __toESM(require("slugify"));
|
|
537
555
|
var getCustomDoc = (directory) => async (filePath) => {
|
|
538
556
|
const fullPath = import_node_path8.default.join(directory, filePath);
|
|
539
557
|
const fullPathWithExtension = fullPath.endsWith(".mdx") ? fullPath : `${fullPath}.mdx`;
|
|
540
|
-
const fileExists =
|
|
558
|
+
const fileExists = import_node_fs4.default.existsSync(fullPathWithExtension);
|
|
541
559
|
if (!fileExists) {
|
|
542
560
|
return void 0;
|
|
543
561
|
}
|
|
@@ -555,9 +573,9 @@ var writeCustomDoc = (directory) => async (customDoc, options = { path: "" }) =>
|
|
|
555
573
|
const name = fileName || (0, import_slugify.default)(customDoc.title, { lower: true });
|
|
556
574
|
const withExtension = name.endsWith(".mdx") ? name : `${name}.mdx`;
|
|
557
575
|
const fullPath = import_node_path8.default.join(directory, options.path || "", withExtension);
|
|
558
|
-
|
|
559
|
-
const document =
|
|
560
|
-
|
|
576
|
+
import_node_fs4.default.mkdirSync(import_node_path8.default.dirname(fullPath), { recursive: true });
|
|
577
|
+
const document = import_gray_matter4.default.stringify(customDoc.markdown.trim(), rest);
|
|
578
|
+
import_node_fs4.default.writeFileSync(fullPath, document);
|
|
561
579
|
};
|
|
562
580
|
var rmCustomDoc = (directory) => async (filePath) => {
|
|
563
581
|
const withExtension = filePath.endsWith(".mdx") ? filePath : `${filePath}.mdx`;
|
|
@@ -566,14 +584,14 @@ var rmCustomDoc = (directory) => async (filePath) => {
|
|
|
566
584
|
|
|
567
585
|
// src/teams.ts
|
|
568
586
|
var import_promises9 = __toESM(require("fs/promises"));
|
|
569
|
-
var
|
|
587
|
+
var import_node_fs5 = __toESM(require("fs"));
|
|
570
588
|
var import_node_path9 = require("path");
|
|
571
|
-
var
|
|
589
|
+
var import_gray_matter5 = __toESM(require("gray-matter"));
|
|
572
590
|
var getTeam = (catalogDir) => async (id) => {
|
|
573
591
|
const files = await getFiles(`${catalogDir}/${id}.md`);
|
|
574
592
|
if (files.length == 0) return void 0;
|
|
575
593
|
const file = files[0];
|
|
576
|
-
const { data, content } =
|
|
594
|
+
const { data, content } = import_gray_matter5.default.read(file);
|
|
577
595
|
return {
|
|
578
596
|
...data,
|
|
579
597
|
id: data.id,
|
|
@@ -585,7 +603,7 @@ var getTeams = (catalogDir) => async (options) => {
|
|
|
585
603
|
const files = await getFiles(`${catalogDir}/teams/*.md`);
|
|
586
604
|
if (files.length === 0) return [];
|
|
587
605
|
return files.map((file) => {
|
|
588
|
-
const { data, content } =
|
|
606
|
+
const { data, content } = import_gray_matter5.default.read(file);
|
|
589
607
|
return {
|
|
590
608
|
...data,
|
|
591
609
|
id: data.id,
|
|
@@ -602,23 +620,23 @@ var writeTeam = (catalogDir) => async (team, options = {}) => {
|
|
|
602
620
|
throw new Error(`Failed to write ${resource.id} (team) as it already exists`);
|
|
603
621
|
}
|
|
604
622
|
const { markdown, ...frontmatter } = resource;
|
|
605
|
-
const document =
|
|
606
|
-
|
|
607
|
-
|
|
623
|
+
const document = import_gray_matter5.default.stringify(markdown, frontmatter);
|
|
624
|
+
import_node_fs5.default.mkdirSync((0, import_node_path9.join)(catalogDir, ""), { recursive: true });
|
|
625
|
+
import_node_fs5.default.writeFileSync((0, import_node_path9.join)(catalogDir, "", `${resource.id}.md`), document);
|
|
608
626
|
};
|
|
609
627
|
var rmTeamById = (catalogDir) => async (id) => {
|
|
610
628
|
await import_promises9.default.rm((0, import_node_path9.join)(catalogDir, `${id}.md`), { recursive: true });
|
|
611
629
|
};
|
|
612
630
|
|
|
613
631
|
// src/users.ts
|
|
614
|
-
var
|
|
632
|
+
var import_node_fs6 = __toESM(require("fs"));
|
|
615
633
|
var import_node_path10 = require("path");
|
|
616
|
-
var
|
|
634
|
+
var import_gray_matter6 = __toESM(require("gray-matter"));
|
|
617
635
|
var getUser = (catalogDir) => async (id) => {
|
|
618
636
|
const files = await getFiles(`${catalogDir}/${id}.md`);
|
|
619
637
|
if (files.length == 0) return void 0;
|
|
620
638
|
const file = files[0];
|
|
621
|
-
const { data, content } =
|
|
639
|
+
const { data, content } = import_gray_matter6.default.read(file);
|
|
622
640
|
return {
|
|
623
641
|
...data,
|
|
624
642
|
id: data.id,
|
|
@@ -631,7 +649,7 @@ var getUsers = (catalogDir) => async (options) => {
|
|
|
631
649
|
const files = await getFiles(`${catalogDir}/users/*.md`);
|
|
632
650
|
if (files.length === 0) return [];
|
|
633
651
|
return files.map((file) => {
|
|
634
|
-
const { data, content } =
|
|
652
|
+
const { data, content } = import_gray_matter6.default.read(file);
|
|
635
653
|
return {
|
|
636
654
|
...data,
|
|
637
655
|
id: data.id,
|
|
@@ -649,16 +667,16 @@ var writeUser = (catalogDir) => async (user, options = {}) => {
|
|
|
649
667
|
throw new Error(`Failed to write ${resource.id} (user) as it already exists`);
|
|
650
668
|
}
|
|
651
669
|
const { markdown, ...frontmatter } = resource;
|
|
652
|
-
const document =
|
|
653
|
-
|
|
654
|
-
|
|
670
|
+
const document = import_gray_matter6.default.stringify(markdown, frontmatter);
|
|
671
|
+
import_node_fs6.default.mkdirSync((0, import_node_path10.join)(catalogDir, ""), { recursive: true });
|
|
672
|
+
import_node_fs6.default.writeFileSync((0, import_node_path10.join)(catalogDir, "", `${resource.id}.md`), document);
|
|
655
673
|
};
|
|
656
674
|
var rmUserById = (catalogDir) => async (id) => {
|
|
657
|
-
|
|
675
|
+
import_node_fs6.default.rmSync((0, import_node_path10.join)(catalogDir, `${id}.md`), { recursive: true });
|
|
658
676
|
};
|
|
659
677
|
|
|
660
678
|
// src/index.ts
|
|
661
|
-
var index_default = (
|
|
679
|
+
var index_default = (path3) => {
|
|
662
680
|
return {
|
|
663
681
|
/**
|
|
664
682
|
* Returns an events from EventCatalog
|
|
@@ -666,13 +684,13 @@ var index_default = (path2) => {
|
|
|
666
684
|
* @param version - Optional id of the version to get (supports semver)
|
|
667
685
|
* @returns Event|Undefined
|
|
668
686
|
*/
|
|
669
|
-
getEvent: getEvent((0, import_node_path11.join)(
|
|
687
|
+
getEvent: getEvent((0, import_node_path11.join)(path3)),
|
|
670
688
|
/**
|
|
671
689
|
* Returns all events from EventCatalog
|
|
672
690
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
673
691
|
* @returns Event[]|Undefined
|
|
674
692
|
*/
|
|
675
|
-
getEvents: getEvents((0, import_node_path11.join)(
|
|
693
|
+
getEvents: getEvents((0, import_node_path11.join)(path3)),
|
|
676
694
|
/**
|
|
677
695
|
* Adds an event to EventCatalog
|
|
678
696
|
*
|
|
@@ -680,7 +698,7 @@ var index_default = (path2) => {
|
|
|
680
698
|
* @param options - Optional options to write the event
|
|
681
699
|
*
|
|
682
700
|
*/
|
|
683
|
-
writeEvent: writeEvent((0, import_node_path11.join)(
|
|
701
|
+
writeEvent: writeEvent((0, import_node_path11.join)(path3, "events")),
|
|
684
702
|
/**
|
|
685
703
|
* Adds an event to a service in EventCatalog
|
|
686
704
|
*
|
|
@@ -689,26 +707,26 @@ var index_default = (path2) => {
|
|
|
689
707
|
* @param options - Optional options to write the event
|
|
690
708
|
*
|
|
691
709
|
*/
|
|
692
|
-
writeEventToService: writeEventToService((0, import_node_path11.join)(
|
|
710
|
+
writeEventToService: writeEventToService((0, import_node_path11.join)(path3, "services")),
|
|
693
711
|
/**
|
|
694
712
|
* Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
|
|
695
713
|
*
|
|
696
714
|
* @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
|
|
697
715
|
*
|
|
698
716
|
*/
|
|
699
|
-
rmEvent: rmEvent((0, import_node_path11.join)(
|
|
717
|
+
rmEvent: rmEvent((0, import_node_path11.join)(path3, "events")),
|
|
700
718
|
/**
|
|
701
719
|
* Remove an event by an Event id
|
|
702
720
|
*
|
|
703
721
|
* @param id - The id of the event you want to remove
|
|
704
722
|
*
|
|
705
723
|
*/
|
|
706
|
-
rmEventById: rmEventById((0, import_node_path11.join)(
|
|
724
|
+
rmEventById: rmEventById((0, import_node_path11.join)(path3)),
|
|
707
725
|
/**
|
|
708
726
|
* Moves a given event id to the version directory
|
|
709
727
|
* @param directory
|
|
710
728
|
*/
|
|
711
|
-
versionEvent: versionEvent((0, import_node_path11.join)(
|
|
729
|
+
versionEvent: versionEvent((0, import_node_path11.join)(path3)),
|
|
712
730
|
/**
|
|
713
731
|
* Adds a file to the given event
|
|
714
732
|
* @param id - The id of the event to add the file to
|
|
@@ -716,7 +734,7 @@ var index_default = (path2) => {
|
|
|
716
734
|
* @param version - Optional version of the event to add the file to
|
|
717
735
|
* @returns
|
|
718
736
|
*/
|
|
719
|
-
addFileToEvent: addFileToEvent((0, import_node_path11.join)(
|
|
737
|
+
addFileToEvent: addFileToEvent((0, import_node_path11.join)(path3)),
|
|
720
738
|
/**
|
|
721
739
|
* Adds a schema to the given event
|
|
722
740
|
* @param id - The id of the event to add the schema to
|
|
@@ -724,14 +742,14 @@ var index_default = (path2) => {
|
|
|
724
742
|
* @param version - Optional version of the event to add the schema to
|
|
725
743
|
* @returns
|
|
726
744
|
*/
|
|
727
|
-
addSchemaToEvent: addSchemaToEvent((0, import_node_path11.join)(
|
|
745
|
+
addSchemaToEvent: addSchemaToEvent((0, import_node_path11.join)(path3)),
|
|
728
746
|
/**
|
|
729
747
|
* Check to see if an event version exists
|
|
730
748
|
* @param id - The id of the event
|
|
731
749
|
* @param version - The version of the event (supports semver)
|
|
732
750
|
* @returns
|
|
733
751
|
*/
|
|
734
|
-
eventHasVersion: eventHasVersion((0, import_node_path11.join)(
|
|
752
|
+
eventHasVersion: eventHasVersion((0, import_node_path11.join)(path3)),
|
|
735
753
|
/**
|
|
736
754
|
* ================================
|
|
737
755
|
* Commands
|
|
@@ -743,13 +761,13 @@ var index_default = (path2) => {
|
|
|
743
761
|
* @param version - Optional id of the version to get (supports semver)
|
|
744
762
|
* @returns Command|Undefined
|
|
745
763
|
*/
|
|
746
|
-
getCommand: getCommand((0, import_node_path11.join)(
|
|
764
|
+
getCommand: getCommand((0, import_node_path11.join)(path3)),
|
|
747
765
|
/**
|
|
748
766
|
* Returns all commands from EventCatalog
|
|
749
767
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
750
768
|
* @returns Command[]|Undefined
|
|
751
769
|
*/
|
|
752
|
-
getCommands: getCommands((0, import_node_path11.join)(
|
|
770
|
+
getCommands: getCommands((0, import_node_path11.join)(path3)),
|
|
753
771
|
/**
|
|
754
772
|
* Adds an command to EventCatalog
|
|
755
773
|
*
|
|
@@ -757,7 +775,7 @@ var index_default = (path2) => {
|
|
|
757
775
|
* @param options - Optional options to write the command
|
|
758
776
|
*
|
|
759
777
|
*/
|
|
760
|
-
writeCommand: writeCommand((0, import_node_path11.join)(
|
|
778
|
+
writeCommand: writeCommand((0, import_node_path11.join)(path3, "commands")),
|
|
761
779
|
/**
|
|
762
780
|
* Adds a command to a service in EventCatalog
|
|
763
781
|
*
|
|
@@ -766,26 +784,26 @@ var index_default = (path2) => {
|
|
|
766
784
|
* @param options - Optional options to write the command
|
|
767
785
|
*
|
|
768
786
|
*/
|
|
769
|
-
writeCommandToService: writeCommandToService((0, import_node_path11.join)(
|
|
787
|
+
writeCommandToService: writeCommandToService((0, import_node_path11.join)(path3, "services")),
|
|
770
788
|
/**
|
|
771
789
|
* Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
|
|
772
790
|
*
|
|
773
791
|
* @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
|
|
774
792
|
*
|
|
775
793
|
*/
|
|
776
|
-
rmCommand: rmCommand((0, import_node_path11.join)(
|
|
794
|
+
rmCommand: rmCommand((0, import_node_path11.join)(path3, "commands")),
|
|
777
795
|
/**
|
|
778
796
|
* Remove an command by an Event id
|
|
779
797
|
*
|
|
780
798
|
* @param id - The id of the command you want to remove
|
|
781
799
|
*
|
|
782
800
|
*/
|
|
783
|
-
rmCommandById: rmCommandById((0, import_node_path11.join)(
|
|
801
|
+
rmCommandById: rmCommandById((0, import_node_path11.join)(path3)),
|
|
784
802
|
/**
|
|
785
803
|
* Moves a given command id to the version directory
|
|
786
804
|
* @param directory
|
|
787
805
|
*/
|
|
788
|
-
versionCommand: versionCommand((0, import_node_path11.join)(
|
|
806
|
+
versionCommand: versionCommand((0, import_node_path11.join)(path3)),
|
|
789
807
|
/**
|
|
790
808
|
* Adds a file to the given command
|
|
791
809
|
* @param id - The id of the command to add the file to
|
|
@@ -793,7 +811,7 @@ var index_default = (path2) => {
|
|
|
793
811
|
* @param version - Optional version of the command to add the file to
|
|
794
812
|
* @returns
|
|
795
813
|
*/
|
|
796
|
-
addFileToCommand: addFileToCommand((0, import_node_path11.join)(
|
|
814
|
+
addFileToCommand: addFileToCommand((0, import_node_path11.join)(path3)),
|
|
797
815
|
/**
|
|
798
816
|
* Adds a schema to the given command
|
|
799
817
|
* @param id - The id of the command to add the schema to
|
|
@@ -801,14 +819,14 @@ var index_default = (path2) => {
|
|
|
801
819
|
* @param version - Optional version of the command to add the schema to
|
|
802
820
|
* @returns
|
|
803
821
|
*/
|
|
804
|
-
addSchemaToCommand: addSchemaToCommand((0, import_node_path11.join)(
|
|
822
|
+
addSchemaToCommand: addSchemaToCommand((0, import_node_path11.join)(path3)),
|
|
805
823
|
/**
|
|
806
824
|
* Check to see if a command version exists
|
|
807
825
|
* @param id - The id of the command
|
|
808
826
|
* @param version - The version of the command (supports semver)
|
|
809
827
|
* @returns
|
|
810
828
|
*/
|
|
811
|
-
commandHasVersion: commandHasVersion((0, import_node_path11.join)(
|
|
829
|
+
commandHasVersion: commandHasVersion((0, import_node_path11.join)(path3)),
|
|
812
830
|
/**
|
|
813
831
|
* ================================
|
|
814
832
|
* Queries
|
|
@@ -820,13 +838,13 @@ var index_default = (path2) => {
|
|
|
820
838
|
* @param version - Optional id of the version to get (supports semver)
|
|
821
839
|
* @returns Query|Undefined
|
|
822
840
|
*/
|
|
823
|
-
getQuery: getQuery((0, import_node_path11.join)(
|
|
841
|
+
getQuery: getQuery((0, import_node_path11.join)(path3)),
|
|
824
842
|
/**
|
|
825
843
|
* Returns all queries from EventCatalog
|
|
826
844
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
827
845
|
* @returns Query[]|Undefined
|
|
828
846
|
*/
|
|
829
|
-
getQueries: getQueries((0, import_node_path11.join)(
|
|
847
|
+
getQueries: getQueries((0, import_node_path11.join)(path3)),
|
|
830
848
|
/**
|
|
831
849
|
* Adds a query to EventCatalog
|
|
832
850
|
*
|
|
@@ -834,7 +852,7 @@ var index_default = (path2) => {
|
|
|
834
852
|
* @param options - Optional options to write the event
|
|
835
853
|
*
|
|
836
854
|
*/
|
|
837
|
-
writeQuery: writeQuery((0, import_node_path11.join)(
|
|
855
|
+
writeQuery: writeQuery((0, import_node_path11.join)(path3, "queries")),
|
|
838
856
|
/**
|
|
839
857
|
* Adds a query to a service in EventCatalog
|
|
840
858
|
*
|
|
@@ -843,26 +861,26 @@ var index_default = (path2) => {
|
|
|
843
861
|
* @param options - Optional options to write the query
|
|
844
862
|
*
|
|
845
863
|
*/
|
|
846
|
-
writeQueryToService: writeQueryToService((0, import_node_path11.join)(
|
|
864
|
+
writeQueryToService: writeQueryToService((0, import_node_path11.join)(path3, "services")),
|
|
847
865
|
/**
|
|
848
866
|
* Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
|
|
849
867
|
*
|
|
850
868
|
* @param path - The path to your query, e.g. `/Orders/GetOrder`
|
|
851
869
|
*
|
|
852
870
|
*/
|
|
853
|
-
rmQuery: rmQuery((0, import_node_path11.join)(
|
|
871
|
+
rmQuery: rmQuery((0, import_node_path11.join)(path3, "queries")),
|
|
854
872
|
/**
|
|
855
873
|
* Remove a query by a Query id
|
|
856
874
|
*
|
|
857
875
|
* @param id - The id of the query you want to remove
|
|
858
876
|
*
|
|
859
877
|
*/
|
|
860
|
-
rmQueryById: rmQueryById((0, import_node_path11.join)(
|
|
878
|
+
rmQueryById: rmQueryById((0, import_node_path11.join)(path3)),
|
|
861
879
|
/**
|
|
862
880
|
* Moves a given query id to the version directory
|
|
863
881
|
* @param directory
|
|
864
882
|
*/
|
|
865
|
-
versionQuery: versionQuery((0, import_node_path11.join)(
|
|
883
|
+
versionQuery: versionQuery((0, import_node_path11.join)(path3)),
|
|
866
884
|
/**
|
|
867
885
|
* Adds a file to the given query
|
|
868
886
|
* @param id - The id of the query to add the file to
|
|
@@ -870,7 +888,7 @@ var index_default = (path2) => {
|
|
|
870
888
|
* @param version - Optional version of the query to add the file to
|
|
871
889
|
* @returns
|
|
872
890
|
*/
|
|
873
|
-
addFileToQuery: addFileToQuery((0, import_node_path11.join)(
|
|
891
|
+
addFileToQuery: addFileToQuery((0, import_node_path11.join)(path3)),
|
|
874
892
|
/**
|
|
875
893
|
* Adds a schema to the given query
|
|
876
894
|
* @param id - The id of the query to add the schema to
|
|
@@ -878,14 +896,14 @@ var index_default = (path2) => {
|
|
|
878
896
|
* @param version - Optional version of the query to add the schema to
|
|
879
897
|
* @returns
|
|
880
898
|
*/
|
|
881
|
-
addSchemaToQuery: addSchemaToQuery((0, import_node_path11.join)(
|
|
899
|
+
addSchemaToQuery: addSchemaToQuery((0, import_node_path11.join)(path3)),
|
|
882
900
|
/**
|
|
883
901
|
* Check to see if an query version exists
|
|
884
902
|
* @param id - The id of the query
|
|
885
903
|
* @param version - The version of the query (supports semver)
|
|
886
904
|
* @returns
|
|
887
905
|
*/
|
|
888
|
-
queryHasVersion: queryHasVersion((0, import_node_path11.join)(
|
|
906
|
+
queryHasVersion: queryHasVersion((0, import_node_path11.join)(path3)),
|
|
889
907
|
/**
|
|
890
908
|
* ================================
|
|
891
909
|
* Channels
|
|
@@ -897,13 +915,13 @@ var index_default = (path2) => {
|
|
|
897
915
|
* @param version - Optional id of the version to get (supports semver)
|
|
898
916
|
* @returns Channel|Undefined
|
|
899
917
|
*/
|
|
900
|
-
getChannel: getChannel((0, import_node_path11.join)(
|
|
918
|
+
getChannel: getChannel((0, import_node_path11.join)(path3)),
|
|
901
919
|
/**
|
|
902
920
|
* Returns all channels from EventCatalog
|
|
903
921
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
904
922
|
* @returns Channel[]|Undefined
|
|
905
923
|
*/
|
|
906
|
-
getChannels: getChannels((0, import_node_path11.join)(
|
|
924
|
+
getChannels: getChannels((0, import_node_path11.join)(path3)),
|
|
907
925
|
/**
|
|
908
926
|
* Adds an channel to EventCatalog
|
|
909
927
|
*
|
|
@@ -911,33 +929,33 @@ var index_default = (path2) => {
|
|
|
911
929
|
* @param options - Optional options to write the channel
|
|
912
930
|
*
|
|
913
931
|
*/
|
|
914
|
-
writeChannel: writeChannel((0, import_node_path11.join)(
|
|
932
|
+
writeChannel: writeChannel((0, import_node_path11.join)(path3, "channels")),
|
|
915
933
|
/**
|
|
916
934
|
* Remove an channel to EventCatalog (modeled on the standard POSIX rm utility)
|
|
917
935
|
*
|
|
918
936
|
* @param path - The path to your channel, e.g. `/Inventory/InventoryAdjusted`
|
|
919
937
|
*
|
|
920
938
|
*/
|
|
921
|
-
rmChannel: rmChannel((0, import_node_path11.join)(
|
|
939
|
+
rmChannel: rmChannel((0, import_node_path11.join)(path3, "channels")),
|
|
922
940
|
/**
|
|
923
941
|
* Remove an channel by an Event id
|
|
924
942
|
*
|
|
925
943
|
* @param id - The id of the channel you want to remove
|
|
926
944
|
*
|
|
927
945
|
*/
|
|
928
|
-
rmChannelById: rmChannelById((0, import_node_path11.join)(
|
|
946
|
+
rmChannelById: rmChannelById((0, import_node_path11.join)(path3)),
|
|
929
947
|
/**
|
|
930
948
|
* Moves a given channel id to the version directory
|
|
931
949
|
* @param directory
|
|
932
950
|
*/
|
|
933
|
-
versionChannel: versionChannel((0, import_node_path11.join)(
|
|
951
|
+
versionChannel: versionChannel((0, import_node_path11.join)(path3)),
|
|
934
952
|
/**
|
|
935
953
|
* Check to see if a channel version exists
|
|
936
954
|
* @param id - The id of the channel
|
|
937
955
|
* @param version - The version of the channel (supports semver)
|
|
938
956
|
* @returns
|
|
939
957
|
*/
|
|
940
|
-
channelHasVersion: channelHasVersion((0, import_node_path11.join)(
|
|
958
|
+
channelHasVersion: channelHasVersion((0, import_node_path11.join)(path3)),
|
|
941
959
|
/**
|
|
942
960
|
* Add a channel to an event
|
|
943
961
|
*
|
|
@@ -954,7 +972,7 @@ var index_default = (path2) => {
|
|
|
954
972
|
*
|
|
955
973
|
* ```
|
|
956
974
|
*/
|
|
957
|
-
addEventToChannel: addMessageToChannel((0, import_node_path11.join)(
|
|
975
|
+
addEventToChannel: addMessageToChannel((0, import_node_path11.join)(path3), "events"),
|
|
958
976
|
/**
|
|
959
977
|
* Add a channel to an command
|
|
960
978
|
*
|
|
@@ -971,7 +989,7 @@ var index_default = (path2) => {
|
|
|
971
989
|
*
|
|
972
990
|
* ```
|
|
973
991
|
*/
|
|
974
|
-
addCommandToChannel: addMessageToChannel((0, import_node_path11.join)(
|
|
992
|
+
addCommandToChannel: addMessageToChannel((0, import_node_path11.join)(path3), "commands"),
|
|
975
993
|
/**
|
|
976
994
|
* Add a channel to an query
|
|
977
995
|
*
|
|
@@ -988,7 +1006,7 @@ var index_default = (path2) => {
|
|
|
988
1006
|
*
|
|
989
1007
|
* ```
|
|
990
1008
|
*/
|
|
991
|
-
addQueryToChannel: addMessageToChannel((0, import_node_path11.join)(
|
|
1009
|
+
addQueryToChannel: addMessageToChannel((0, import_node_path11.join)(path3), "queries"),
|
|
992
1010
|
/**
|
|
993
1011
|
* ================================
|
|
994
1012
|
* SERVICES
|
|
@@ -1001,14 +1019,14 @@ var index_default = (path2) => {
|
|
|
1001
1019
|
* @param options - Optional options to write the event
|
|
1002
1020
|
*
|
|
1003
1021
|
*/
|
|
1004
|
-
writeService: writeService((0, import_node_path11.join)(
|
|
1022
|
+
writeService: writeService((0, import_node_path11.join)(path3, "services")),
|
|
1005
1023
|
/**
|
|
1006
1024
|
* Adds a versioned service to EventCatalog
|
|
1007
1025
|
*
|
|
1008
1026
|
* @param service - The service to write
|
|
1009
1027
|
*
|
|
1010
1028
|
*/
|
|
1011
|
-
writeVersionedService: writeVersionedService((0, import_node_path11.join)(
|
|
1029
|
+
writeVersionedService: writeVersionedService((0, import_node_path11.join)(path3, "services")),
|
|
1012
1030
|
/**
|
|
1013
1031
|
* Adds a service to a domain in EventCatalog
|
|
1014
1032
|
*
|
|
@@ -1017,39 +1035,39 @@ var index_default = (path2) => {
|
|
|
1017
1035
|
* @param options - Optional options to write the event
|
|
1018
1036
|
*
|
|
1019
1037
|
*/
|
|
1020
|
-
writeServiceToDomain: writeServiceToDomain((0, import_node_path11.join)(
|
|
1038
|
+
writeServiceToDomain: writeServiceToDomain((0, import_node_path11.join)(path3, "domains")),
|
|
1021
1039
|
/**
|
|
1022
1040
|
* Returns a service from EventCatalog
|
|
1023
1041
|
* @param id - The id of the service to retrieve
|
|
1024
1042
|
* @param version - Optional id of the version to get (supports semver)
|
|
1025
1043
|
* @returns Service|Undefined
|
|
1026
1044
|
*/
|
|
1027
|
-
getService: getService((0, import_node_path11.join)(
|
|
1045
|
+
getService: getService((0, import_node_path11.join)(path3)),
|
|
1028
1046
|
/**
|
|
1029
1047
|
* Returns all services from EventCatalog
|
|
1030
1048
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1031
1049
|
* @returns Service[]|Undefined
|
|
1032
1050
|
*/
|
|
1033
|
-
getServices: getServices((0, import_node_path11.join)(
|
|
1051
|
+
getServices: getServices((0, import_node_path11.join)(path3)),
|
|
1034
1052
|
/**
|
|
1035
1053
|
* Moves a given service id to the version directory
|
|
1036
1054
|
* @param directory
|
|
1037
1055
|
*/
|
|
1038
|
-
versionService: versionService((0, import_node_path11.join)(
|
|
1056
|
+
versionService: versionService((0, import_node_path11.join)(path3)),
|
|
1039
1057
|
/**
|
|
1040
1058
|
* Remove a service from EventCatalog (modeled on the standard POSIX rm utility)
|
|
1041
1059
|
*
|
|
1042
1060
|
* @param path - The path to your service, e.g. `/InventoryService`
|
|
1043
1061
|
*
|
|
1044
1062
|
*/
|
|
1045
|
-
rmService: rmService((0, import_node_path11.join)(
|
|
1063
|
+
rmService: rmService((0, import_node_path11.join)(path3, "services")),
|
|
1046
1064
|
/**
|
|
1047
1065
|
* Remove an service by an service id
|
|
1048
1066
|
*
|
|
1049
1067
|
* @param id - The id of the service you want to remove
|
|
1050
1068
|
*
|
|
1051
1069
|
*/
|
|
1052
|
-
rmServiceById: rmServiceById((0, import_node_path11.join)(
|
|
1070
|
+
rmServiceById: rmServiceById((0, import_node_path11.join)(path3)),
|
|
1053
1071
|
/**
|
|
1054
1072
|
* Adds a file to the given service
|
|
1055
1073
|
* @param id - The id of the service to add the file to
|
|
@@ -1057,21 +1075,21 @@ var index_default = (path2) => {
|
|
|
1057
1075
|
* @param version - Optional version of the service to add the file to
|
|
1058
1076
|
* @returns
|
|
1059
1077
|
*/
|
|
1060
|
-
addFileToService: addFileToService((0, import_node_path11.join)(
|
|
1078
|
+
addFileToService: addFileToService((0, import_node_path11.join)(path3)),
|
|
1061
1079
|
/**
|
|
1062
1080
|
* Returns the specifications for a given service
|
|
1063
1081
|
* @param id - The id of the service to retrieve the specifications for
|
|
1064
1082
|
* @param version - Optional version of the service
|
|
1065
1083
|
* @returns
|
|
1066
1084
|
*/
|
|
1067
|
-
getSpecificationFilesForService: getSpecificationFilesForService((0, import_node_path11.join)(
|
|
1085
|
+
getSpecificationFilesForService: getSpecificationFilesForService((0, import_node_path11.join)(path3)),
|
|
1068
1086
|
/**
|
|
1069
1087
|
* Check to see if a service version exists
|
|
1070
1088
|
* @param id - The id of the service
|
|
1071
1089
|
* @param version - The version of the service (supports semver)
|
|
1072
1090
|
* @returns
|
|
1073
1091
|
*/
|
|
1074
|
-
serviceHasVersion: serviceHasVersion((0, import_node_path11.join)(
|
|
1092
|
+
serviceHasVersion: serviceHasVersion((0, import_node_path11.join)(path3)),
|
|
1075
1093
|
/**
|
|
1076
1094
|
* Add an event to a service by it's id.
|
|
1077
1095
|
*
|
|
@@ -1091,7 +1109,7 @@ var index_default = (path2) => {
|
|
|
1091
1109
|
*
|
|
1092
1110
|
* ```
|
|
1093
1111
|
*/
|
|
1094
|
-
addEventToService: addMessageToService((0, import_node_path11.join)(
|
|
1112
|
+
addEventToService: addMessageToService((0, import_node_path11.join)(path3)),
|
|
1095
1113
|
/**
|
|
1096
1114
|
* Add a command to a service by it's id.
|
|
1097
1115
|
*
|
|
@@ -1111,7 +1129,7 @@ var index_default = (path2) => {
|
|
|
1111
1129
|
*
|
|
1112
1130
|
* ```
|
|
1113
1131
|
*/
|
|
1114
|
-
addCommandToService: addMessageToService((0, import_node_path11.join)(
|
|
1132
|
+
addCommandToService: addMessageToService((0, import_node_path11.join)(path3)),
|
|
1115
1133
|
/**
|
|
1116
1134
|
* Add a query to a service by it's id.
|
|
1117
1135
|
*
|
|
@@ -1131,7 +1149,7 @@ var index_default = (path2) => {
|
|
|
1131
1149
|
*
|
|
1132
1150
|
* ```
|
|
1133
1151
|
*/
|
|
1134
|
-
addQueryToService: addMessageToService((0, import_node_path11.join)(
|
|
1152
|
+
addQueryToService: addMessageToService((0, import_node_path11.join)(path3)),
|
|
1135
1153
|
/**
|
|
1136
1154
|
* ================================
|
|
1137
1155
|
* Domains
|
|
@@ -1144,39 +1162,39 @@ var index_default = (path2) => {
|
|
|
1144
1162
|
* @param options - Optional options to write the event
|
|
1145
1163
|
*
|
|
1146
1164
|
*/
|
|
1147
|
-
writeDomain: writeDomain((0, import_node_path11.join)(
|
|
1165
|
+
writeDomain: writeDomain((0, import_node_path11.join)(path3, "domains")),
|
|
1148
1166
|
/**
|
|
1149
1167
|
* Returns a domain from EventCatalog
|
|
1150
1168
|
* @param id - The id of the domain to retrieve
|
|
1151
1169
|
* @param version - Optional id of the version to get (supports semver)
|
|
1152
1170
|
* @returns Domain|Undefined
|
|
1153
1171
|
*/
|
|
1154
|
-
getDomain: getDomain((0, import_node_path11.join)(
|
|
1172
|
+
getDomain: getDomain((0, import_node_path11.join)(path3, "domains")),
|
|
1155
1173
|
/**
|
|
1156
1174
|
* Returns all domains from EventCatalog
|
|
1157
1175
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1158
1176
|
* @returns Domain[]|Undefined
|
|
1159
1177
|
*/
|
|
1160
|
-
getDomains: getDomains((0, import_node_path11.join)(
|
|
1178
|
+
getDomains: getDomains((0, import_node_path11.join)(path3)),
|
|
1161
1179
|
/**
|
|
1162
1180
|
* Moves a given domain id to the version directory
|
|
1163
1181
|
* @param directory
|
|
1164
1182
|
*/
|
|
1165
|
-
versionDomain: versionDomain((0, import_node_path11.join)(
|
|
1183
|
+
versionDomain: versionDomain((0, import_node_path11.join)(path3, "domains")),
|
|
1166
1184
|
/**
|
|
1167
1185
|
* Remove a domain from EventCatalog (modeled on the standard POSIX rm utility)
|
|
1168
1186
|
*
|
|
1169
1187
|
* @param path - The path to your domain, e.g. `/Payment`
|
|
1170
1188
|
*
|
|
1171
1189
|
*/
|
|
1172
|
-
rmDomain: rmDomain((0, import_node_path11.join)(
|
|
1190
|
+
rmDomain: rmDomain((0, import_node_path11.join)(path3, "domains")),
|
|
1173
1191
|
/**
|
|
1174
1192
|
* Remove an service by an domain id
|
|
1175
1193
|
*
|
|
1176
1194
|
* @param id - The id of the domain you want to remove
|
|
1177
1195
|
*
|
|
1178
1196
|
*/
|
|
1179
|
-
rmDomainById: rmDomainById((0, import_node_path11.join)(
|
|
1197
|
+
rmDomainById: rmDomainById((0, import_node_path11.join)(path3, "domains")),
|
|
1180
1198
|
/**
|
|
1181
1199
|
* Adds a file to the given domain
|
|
1182
1200
|
* @param id - The id of the domain to add the file to
|
|
@@ -1184,14 +1202,28 @@ var index_default = (path2) => {
|
|
|
1184
1202
|
* @param version - Optional version of the domain to add the file to
|
|
1185
1203
|
* @returns
|
|
1186
1204
|
*/
|
|
1187
|
-
addFileToDomain: addFileToDomain((0, import_node_path11.join)(
|
|
1205
|
+
addFileToDomain: addFileToDomain((0, import_node_path11.join)(path3, "domains")),
|
|
1206
|
+
/**
|
|
1207
|
+
* Adds an ubiquitous language dictionary to a domain
|
|
1208
|
+
* @param id - The id of the domain to add the ubiquitous language to
|
|
1209
|
+
* @param ubiquitousLanguageDictionary - The ubiquitous language dictionary to add
|
|
1210
|
+
* @param version - Optional version of the domain to add the ubiquitous language to
|
|
1211
|
+
*/
|
|
1212
|
+
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain((0, import_node_path11.join)(path3, "domains")),
|
|
1213
|
+
/**
|
|
1214
|
+
* Get the ubiquitous language dictionary from a domain
|
|
1215
|
+
* @param id - The id of the domain to get the ubiquitous language from
|
|
1216
|
+
* @param version - Optional version of the domain to get the ubiquitous language from
|
|
1217
|
+
* @returns
|
|
1218
|
+
*/
|
|
1219
|
+
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain((0, import_node_path11.join)(path3, "domains")),
|
|
1188
1220
|
/**
|
|
1189
1221
|
* Check to see if a domain version exists
|
|
1190
1222
|
* @param id - The id of the domain
|
|
1191
1223
|
* @param version - The version of the domain (supports semver)
|
|
1192
1224
|
* @returns
|
|
1193
1225
|
*/
|
|
1194
|
-
domainHasVersion: domainHasVersion((0, import_node_path11.join)(
|
|
1226
|
+
domainHasVersion: domainHasVersion((0, import_node_path11.join)(path3)),
|
|
1195
1227
|
/**
|
|
1196
1228
|
* Adds a given service to a domain
|
|
1197
1229
|
* @param id - The id of the domain
|
|
@@ -1199,7 +1231,7 @@ var index_default = (path2) => {
|
|
|
1199
1231
|
* @param version - (Optional) The version of the domain to add the service to
|
|
1200
1232
|
* @returns
|
|
1201
1233
|
*/
|
|
1202
|
-
addServiceToDomain: addServiceToDomain((0, import_node_path11.join)(
|
|
1234
|
+
addServiceToDomain: addServiceToDomain((0, import_node_path11.join)(path3, "domains")),
|
|
1203
1235
|
/**
|
|
1204
1236
|
* ================================
|
|
1205
1237
|
* Teams
|
|
@@ -1212,25 +1244,25 @@ var index_default = (path2) => {
|
|
|
1212
1244
|
* @param options - Optional options to write the team
|
|
1213
1245
|
*
|
|
1214
1246
|
*/
|
|
1215
|
-
writeTeam: writeTeam((0, import_node_path11.join)(
|
|
1247
|
+
writeTeam: writeTeam((0, import_node_path11.join)(path3, "teams")),
|
|
1216
1248
|
/**
|
|
1217
1249
|
* Returns a team from EventCatalog
|
|
1218
1250
|
* @param id - The id of the team to retrieve
|
|
1219
1251
|
* @returns Team|Undefined
|
|
1220
1252
|
*/
|
|
1221
|
-
getTeam: getTeam((0, import_node_path11.join)(
|
|
1253
|
+
getTeam: getTeam((0, import_node_path11.join)(path3, "teams")),
|
|
1222
1254
|
/**
|
|
1223
1255
|
* Returns all teams from EventCatalog
|
|
1224
1256
|
* @returns Team[]|Undefined
|
|
1225
1257
|
*/
|
|
1226
|
-
getTeams: getTeams((0, import_node_path11.join)(
|
|
1258
|
+
getTeams: getTeams((0, import_node_path11.join)(path3)),
|
|
1227
1259
|
/**
|
|
1228
1260
|
* Remove a team by the team id
|
|
1229
1261
|
*
|
|
1230
1262
|
* @param id - The id of the team you want to remove
|
|
1231
1263
|
*
|
|
1232
1264
|
*/
|
|
1233
|
-
rmTeamById: rmTeamById((0, import_node_path11.join)(
|
|
1265
|
+
rmTeamById: rmTeamById((0, import_node_path11.join)(path3, "teams")),
|
|
1234
1266
|
/**
|
|
1235
1267
|
* ================================
|
|
1236
1268
|
* Users
|
|
@@ -1243,25 +1275,25 @@ var index_default = (path2) => {
|
|
|
1243
1275
|
* @param options - Optional options to write the user
|
|
1244
1276
|
*
|
|
1245
1277
|
*/
|
|
1246
|
-
writeUser: writeUser((0, import_node_path11.join)(
|
|
1278
|
+
writeUser: writeUser((0, import_node_path11.join)(path3, "users")),
|
|
1247
1279
|
/**
|
|
1248
1280
|
* Returns a user from EventCatalog
|
|
1249
1281
|
* @param id - The id of the user to retrieve
|
|
1250
1282
|
* @returns User|Undefined
|
|
1251
1283
|
*/
|
|
1252
|
-
getUser: getUser((0, import_node_path11.join)(
|
|
1284
|
+
getUser: getUser((0, import_node_path11.join)(path3, "users")),
|
|
1253
1285
|
/**
|
|
1254
1286
|
* Returns all user from EventCatalog
|
|
1255
1287
|
* @returns User[]|Undefined
|
|
1256
1288
|
*/
|
|
1257
|
-
getUsers: getUsers((0, import_node_path11.join)(
|
|
1289
|
+
getUsers: getUsers((0, import_node_path11.join)(path3)),
|
|
1258
1290
|
/**
|
|
1259
1291
|
* Remove a user by the user id
|
|
1260
1292
|
*
|
|
1261
1293
|
* @param id - The id of the user you want to remove
|
|
1262
1294
|
*
|
|
1263
1295
|
*/
|
|
1264
|
-
rmUserById: rmUserById((0, import_node_path11.join)(
|
|
1296
|
+
rmUserById: rmUserById((0, import_node_path11.join)(path3, "users")),
|
|
1265
1297
|
/**
|
|
1266
1298
|
* ================================
|
|
1267
1299
|
* Custom Docs
|
|
@@ -1272,26 +1304,26 @@ var index_default = (path2) => {
|
|
|
1272
1304
|
* @param path - The path to the custom doc to retrieve
|
|
1273
1305
|
* @returns CustomDoc|Undefined
|
|
1274
1306
|
*/
|
|
1275
|
-
getCustomDoc: getCustomDoc((0, import_node_path11.join)(
|
|
1307
|
+
getCustomDoc: getCustomDoc((0, import_node_path11.join)(path3, "docs")),
|
|
1276
1308
|
/**
|
|
1277
1309
|
* Returns all custom docs from EventCatalog
|
|
1278
1310
|
* @param options - Optional options to get custom docs from a specific path
|
|
1279
1311
|
* @returns CustomDoc[]|Undefined
|
|
1280
1312
|
*/
|
|
1281
|
-
getCustomDocs: getCustomDocs((0, import_node_path11.join)(
|
|
1313
|
+
getCustomDocs: getCustomDocs((0, import_node_path11.join)(path3, "docs")),
|
|
1282
1314
|
/**
|
|
1283
1315
|
* Writes a custom doc to EventCatalog
|
|
1284
1316
|
* @param customDoc - The custom doc to write
|
|
1285
1317
|
* @param options - Optional options to write the custom doc
|
|
1286
1318
|
*
|
|
1287
1319
|
*/
|
|
1288
|
-
writeCustomDoc: writeCustomDoc((0, import_node_path11.join)(
|
|
1320
|
+
writeCustomDoc: writeCustomDoc((0, import_node_path11.join)(path3, "docs")),
|
|
1289
1321
|
/**
|
|
1290
1322
|
* Removes a custom doc from EventCatalog
|
|
1291
1323
|
* @param path - The path to the custom doc to remove
|
|
1292
1324
|
*
|
|
1293
1325
|
*/
|
|
1294
|
-
rmCustomDoc: rmCustomDoc((0, import_node_path11.join)(
|
|
1326
|
+
rmCustomDoc: rmCustomDoc((0, import_node_path11.join)(path3, "docs"))
|
|
1295
1327
|
};
|
|
1296
1328
|
};
|
|
1297
1329
|
//# sourceMappingURL=index.js.map
|