@eventcatalog/sdk 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/channels.d.mts +1 -1
  2. package/dist/channels.d.ts +1 -1
  3. package/dist/channels.js +1 -1
  4. package/dist/channels.js.map +1 -1
  5. package/dist/channels.mjs +1 -1
  6. package/dist/channels.mjs.map +1 -1
  7. package/dist/commands.d.mts +1 -1
  8. package/dist/commands.d.ts +1 -1
  9. package/dist/commands.js +17 -4
  10. package/dist/commands.js.map +1 -1
  11. package/dist/commands.mjs +17 -4
  12. package/dist/commands.mjs.map +1 -1
  13. package/dist/custom-docs.js.map +1 -1
  14. package/dist/custom-docs.mjs.map +1 -1
  15. package/dist/domains.d.mts +42 -3
  16. package/dist/domains.d.ts +42 -3
  17. package/dist/domains.js +37 -10
  18. package/dist/domains.js.map +1 -1
  19. package/dist/domains.mjs +35 -10
  20. package/dist/domains.mjs.map +1 -1
  21. package/dist/events.d.mts +1 -1
  22. package/dist/events.d.ts +1 -1
  23. package/dist/events.js +15 -2
  24. package/dist/events.js.map +1 -1
  25. package/dist/events.mjs +15 -2
  26. package/dist/events.mjs.map +1 -1
  27. package/dist/index.d.mts +25 -21
  28. package/dist/index.d.ts +25 -21
  29. package/dist/index.js +183 -130
  30. package/dist/index.js.map +1 -1
  31. package/dist/index.mjs +188 -135
  32. package/dist/index.mjs.map +1 -1
  33. package/dist/queries.d.mts +1 -1
  34. package/dist/queries.d.ts +1 -1
  35. package/dist/queries.js +15 -2
  36. package/dist/queries.js.map +1 -1
  37. package/dist/queries.mjs +15 -2
  38. package/dist/queries.mjs.map +1 -1
  39. package/dist/services.d.mts +1 -1
  40. package/dist/services.d.ts +1 -1
  41. package/dist/services.js +1 -1
  42. package/dist/services.js.map +1 -1
  43. package/dist/services.mjs +1 -1
  44. package/dist/services.mjs.map +1 -1
  45. package/dist/types.d.d.mts +13 -1
  46. package/dist/types.d.d.ts +13 -1
  47. package/dist/types.d.js.map +1 -1
  48. 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((path2) => !path2.includes("versioned"));
57
+ const latestVersion = matchedFiles.find((path3) => !path3.includes("versioned"));
58
58
  if (!version) {
59
59
  return latestVersion;
60
60
  }
61
- const parsedFiles = matchedFiles.map((path2) => {
62
- const { data } = import_gray_matter.default.read(path2);
63
- return { ...data, path: path2 };
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 (path2) => {
88
- const { data } = import_gray_matter.default.read(path2);
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
  };
@@ -140,7 +140,7 @@ var versionResource = async (catalogDir, id) => {
140
140
  const files = await getFiles(`${catalogDir}/**/index.{md,mdx}`);
141
141
  const matchedFiles = await searchFilesForId(files, id);
142
142
  if (matchedFiles.length === 0) {
143
- throw new Error(`No event found with id: ${id}`);
143
+ throw new Error(`No resource found with id: ${id}`);
144
144
  }
145
145
  const file = matchedFiles[0];
146
146
  const sourceDirectory = (0, import_path.dirname)(file);
@@ -166,8 +166,8 @@ var writeResource = async (catalogDir, resource, options = {
166
166
  override: false,
167
167
  versionExistingContent: false
168
168
  }) => {
169
- const path2 = options.path || `/${resource.id}`;
170
- const fullPath = (0, import_path.join)(catalogDir, path2);
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)) {
@@ -210,6 +210,15 @@ var getResource = async (catalogDir, id, version, options) => {
210
210
  markdown: content.trim()
211
211
  };
212
212
  };
213
+ var getResourcePath = async (catalogDir, id, version) => {
214
+ const file = await findFileById(catalogDir, id, version);
215
+ if (!file) return;
216
+ return {
217
+ fullPath: file,
218
+ relativePath: file.replace(catalogDir, ""),
219
+ directory: (0, import_path.dirname)(file.replace(catalogDir, ""))
220
+ };
221
+ };
213
222
  var getResources = async (catalogDir, {
214
223
  type,
215
224
  latestOnly = false,
@@ -270,12 +279,16 @@ var getEvent = (directory) => async (id, version) => getResource(directory, id,
270
279
  var getEvents = (directory) => async (options) => getResources(directory, { type: "events", ...options });
271
280
  var writeEvent = (directory) => async (event, options = { path: "", override: false }) => writeResource(directory, { ...event }, { ...options, type: "event" });
272
281
  var writeEventToService = (directory) => async (event, service, options = { path: "" }) => {
273
- let pathForEvent = service.version && service.version !== "latest" ? `/${service.id}/versioned/${service.version}/events` : `/${service.id}/events`;
282
+ const resourcePath = await getResourcePath(directory, service.id, service.version);
283
+ if (!resourcePath) {
284
+ throw new Error("Service not found");
285
+ }
286
+ let pathForEvent = service.version && service.version !== "latest" ? `${resourcePath.directory}/versioned/${service.version}/events` : `${resourcePath.directory}/events`;
274
287
  pathForEvent = (0, import_node_path2.join)(pathForEvent, event.id);
275
288
  await writeResource(directory, { ...event }, { ...options, path: pathForEvent, type: "event" });
276
289
  };
277
- var rmEvent = (directory) => async (path2) => {
278
- await import_promises2.default.rm((0, import_node_path2.join)(directory, path2), { recursive: true });
290
+ var rmEvent = (directory) => async (path3) => {
291
+ await import_promises2.default.rm((0, import_node_path2.join)(directory, path3), { recursive: true });
279
292
  };
280
293
  var rmEventById = (directory) => async (id, version, persistFiles) => {
281
294
  await rmResourceById(directory, id, version, { type: "event", persistFiles });
@@ -297,12 +310,16 @@ var getCommand = (directory) => async (id, version) => getResource(directory, id
297
310
  var getCommands = (directory) => async (options) => getResources(directory, { type: "commands", ...options });
298
311
  var writeCommand = (directory) => async (command, options = { path: "" }) => writeResource(directory, { ...command }, { ...options, type: "command" });
299
312
  var writeCommandToService = (directory) => async (command, service, options = { path: "" }) => {
300
- let pathForEvent = service.version && service.version !== "latest" ? `/${service.id}/versioned/${service.version}/commands` : `/${service.id}/commands`;
301
- pathForEvent = (0, import_node_path3.join)(pathForEvent, command.id);
302
- await writeResource(directory, { ...command }, { ...options, path: pathForEvent, type: "command" });
313
+ const resourcePath = await getResourcePath(directory, service.id, service.version);
314
+ if (!resourcePath) {
315
+ throw new Error("Service not found");
316
+ }
317
+ let pathForCommand = service.version && service.version !== "latest" ? `${resourcePath.directory}/versioned/${service.version}/commands` : `${resourcePath.directory}/commands`;
318
+ pathForCommand = (0, import_node_path3.join)(pathForCommand, command.id);
319
+ await writeResource(directory, { ...command }, { ...options, path: pathForCommand, type: "command" });
303
320
  };
304
- var rmCommand = (directory) => async (path2) => {
305
- await import_promises3.default.rm((0, import_node_path3.join)(directory, path2), { recursive: true });
321
+ var rmCommand = (directory) => async (path3) => {
322
+ await import_promises3.default.rm((0, import_node_path3.join)(directory, path3), { recursive: true });
306
323
  };
307
324
  var rmCommandById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "command", persistFiles });
308
325
  var versionCommand = (directory) => async (id) => versionResource(directory, id);
@@ -322,12 +339,16 @@ var getQuery = (directory) => async (id, version) => getResource(directory, id,
322
339
  var writeQuery = (directory) => async (query, options = { path: "" }) => writeResource(directory, { ...query }, { ...options, type: "query" });
323
340
  var getQueries = (directory) => async (options) => getResources(directory, { type: "queries", ...options });
324
341
  var writeQueryToService = (directory) => async (query, service, options = { path: "" }) => {
325
- let pathForQuery = service.version && service.version !== "latest" ? `/${service.id}/versioned/${service.version}/queries` : `/${service.id}/queries`;
342
+ const resourcePath = await getResourcePath(directory, service.id, service.version);
343
+ if (!resourcePath) {
344
+ throw new Error("Service not found");
345
+ }
346
+ let pathForQuery = service.version && service.version !== "latest" ? `${resourcePath.directory}/versioned/${service.version}/queries` : `${resourcePath.directory}/queries`;
326
347
  pathForQuery = (0, import_node_path4.join)(pathForQuery, query.id);
327
348
  await writeResource(directory, { ...query }, { ...options, path: pathForQuery, type: "query" });
328
349
  };
329
- var rmQuery = (directory) => async (path2) => {
330
- await import_promises4.default.rm((0, import_node_path4.join)(directory, path2), { recursive: true });
350
+ var rmQuery = (directory) => async (path3) => {
351
+ await import_promises4.default.rm((0, import_node_path4.join)(directory, path3), { recursive: true });
331
352
  };
332
353
  var rmQueryById = (directory) => async (id, version, persistFiles) => {
333
354
  await rmResourceById(directory, id, version, { type: "query", persistFiles });
@@ -363,8 +384,8 @@ var writeService = (directory) => async (service, options = { path: "" }) => {
363
384
  };
364
385
  var writeVersionedService = (directory) => async (service) => {
365
386
  const resource = { ...service };
366
- const path2 = getVersionedDirectory(service.id, service.version);
367
- return await writeService(directory)(resource, { path: path2 });
387
+ const path3 = getVersionedDirectory(service.id, service.version);
388
+ return await writeService(directory)(resource, { path: path3 });
368
389
  };
369
390
  var writeServiceToDomain = (directory) => async (service, domain, options = { path: "" }) => {
370
391
  let pathForService = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/services` : `/${domain.id}/services`;
@@ -372,8 +393,8 @@ var writeServiceToDomain = (directory) => async (service, domain, options = { pa
372
393
  await writeResource(directory, { ...service }, { ...options, path: pathForService, type: "service" });
373
394
  };
374
395
  var versionService = (directory) => async (id) => versionResource(directory, id);
375
- var rmService = (directory) => async (path2) => {
376
- await import_promises5.default.rm((0, import_node_path5.join)(directory, path2), { recursive: true });
396
+ var rmService = (directory) => async (path3) => {
397
+ await import_promises5.default.rm((0, import_node_path5.join)(directory, path3), { recursive: true });
377
398
  };
378
399
  var rmServiceById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "service", persistFiles });
379
400
  var addFileToService = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
@@ -426,8 +447,8 @@ var addMessageToService = (directory) => async (id, direction, event, version) =
426
447
  if (!existingResource) {
427
448
  throw new Error(`Cannot find service ${id} in the catalog`);
428
449
  }
429
- const path2 = existingResource.split("/services")[0];
430
- const pathToResource = (0, import_node_path5.join)(path2, "services");
450
+ const path3 = existingResource.split("/services")[0];
451
+ const pathToResource = (0, import_node_path5.join)(path3, "services");
431
452
  await rmServiceById(directory)(id, version);
432
453
  await writeService(pathToResource)(service);
433
454
  };
@@ -438,7 +459,9 @@ var serviceHasVersion = (directory) => async (id, version) => {
438
459
 
439
460
  // src/domains.ts
440
461
  var import_promises6 = __toESM(require("fs/promises"));
441
- var import_node_path6 = require("path");
462
+ var import_node_path6 = __toESM(require("path"));
463
+ var import_node_fs3 = __toESM(require("fs"));
464
+ var import_gray_matter3 = __toESM(require("gray-matter"));
442
465
  var getDomain = (directory) => async (id, version) => getResource(directory, id, version, { type: "domain" });
443
466
  var getDomains = (directory) => async (options) => getResources(directory, {
444
467
  type: "domains",
@@ -453,11 +476,27 @@ var writeDomain = (directory) => async (domain, options = { path: "" }) => {
453
476
  return await writeResource(directory, resource, { ...options, type: "domain" });
454
477
  };
455
478
  var versionDomain = (directory) => async (id) => versionResource(directory, id);
456
- var rmDomain = (directory) => async (path2) => {
457
- await import_promises6.default.rm((0, import_node_path6.join)(directory, path2), { recursive: true });
479
+ var rmDomain = (directory) => async (path3) => {
480
+ await import_promises6.default.rm((0, import_node_path6.join)(directory, path3), { recursive: true });
458
481
  };
459
482
  var rmDomainById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "domain", persistFiles });
460
483
  var addFileToDomain = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
484
+ var addUbiquitousLanguageToDomain = (directory) => async (id, ubiquitousLanguageDictionary, version) => {
485
+ const content = import_gray_matter3.default.stringify("", {
486
+ ...ubiquitousLanguageDictionary
487
+ });
488
+ await addFileToResource(directory, id, { content, fileName: "ubiquitous-language.mdx" }, version);
489
+ };
490
+ var getUbiquitousLanguageFromDomain = (directory) => async (id, version) => {
491
+ const pathToDomain = await findFileById(directory, id, version) || "";
492
+ const pathToUbiquitousLanguage = import_node_path6.default.join(import_node_path6.default.dirname(pathToDomain), "ubiquitous-language.mdx");
493
+ const fileExists = import_node_fs3.default.existsSync(pathToUbiquitousLanguage);
494
+ if (!fileExists) {
495
+ return void 0;
496
+ }
497
+ const content = await readMdxFile(pathToUbiquitousLanguage);
498
+ return content;
499
+ };
461
500
  var domainHasVersion = (directory) => async (id, version) => {
462
501
  const file = await findFileById(directory, id, version);
463
502
  return !!file;
@@ -482,8 +521,8 @@ var import_node_path7 = require("path");
482
521
  var getChannel = (directory) => async (id, version) => getResource(directory, id, version, { type: "channel" });
483
522
  var getChannels = (directory) => async (options) => getResources(directory, { type: "channels", ...options });
484
523
  var writeChannel = (directory) => async (channel, options = { path: "" }) => writeResource(directory, { ...channel }, { ...options, type: "channel" });
485
- var rmChannel = (directory) => async (path2) => {
486
- await import_promises7.default.rm((0, import_node_path7.join)(directory, path2), { recursive: true });
524
+ var rmChannel = (directory) => async (path3) => {
525
+ await import_promises7.default.rm((0, import_node_path7.join)(directory, path3), { recursive: true });
487
526
  };
488
527
  var rmChannelById = (directory) => async (id, version, persistFiles) => rmResourceById(directory, id, version, { type: "channel", persistFiles });
489
528
  var versionChannel = (directory) => async (id) => versionResource(directory, id);
@@ -522,22 +561,22 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
522
561
  if (!existingResource) {
523
562
  throw new Error(`Cannot find message ${id} in the catalog`);
524
563
  }
525
- const path2 = existingResource.split(`/${collection}`)[0];
526
- const pathToResource = (0, import_node_path7.join)(path2, collection);
564
+ const path3 = existingResource.split(`/${collection}`)[0];
565
+ const pathToResource = (0, import_node_path7.join)(path3, collection);
527
566
  await rmMessageById(directory)(_message.id, _message.version, true);
528
567
  await writeMessage(pathToResource)(message);
529
568
  };
530
569
 
531
570
  // src/custom-docs.ts
532
571
  var import_node_path8 = __toESM(require("path"));
533
- var import_node_fs3 = __toESM(require("fs"));
572
+ var import_node_fs4 = __toESM(require("fs"));
534
573
  var import_promises8 = __toESM(require("fs/promises"));
535
- var import_gray_matter3 = __toESM(require("gray-matter"));
574
+ var import_gray_matter4 = __toESM(require("gray-matter"));
536
575
  var import_slugify = __toESM(require("slugify"));
537
576
  var getCustomDoc = (directory) => async (filePath) => {
538
577
  const fullPath = import_node_path8.default.join(directory, filePath);
539
578
  const fullPathWithExtension = fullPath.endsWith(".mdx") ? fullPath : `${fullPath}.mdx`;
540
- const fileExists = import_node_fs3.default.existsSync(fullPathWithExtension);
579
+ const fileExists = import_node_fs4.default.existsSync(fullPathWithExtension);
541
580
  if (!fileExists) {
542
581
  return void 0;
543
582
  }
@@ -555,9 +594,9 @@ var writeCustomDoc = (directory) => async (customDoc, options = { path: "" }) =>
555
594
  const name = fileName || (0, import_slugify.default)(customDoc.title, { lower: true });
556
595
  const withExtension = name.endsWith(".mdx") ? name : `${name}.mdx`;
557
596
  const fullPath = import_node_path8.default.join(directory, options.path || "", withExtension);
558
- import_node_fs3.default.mkdirSync(import_node_path8.default.dirname(fullPath), { recursive: true });
559
- const document = import_gray_matter3.default.stringify(customDoc.markdown.trim(), rest);
560
- import_node_fs3.default.writeFileSync(fullPath, document);
597
+ import_node_fs4.default.mkdirSync(import_node_path8.default.dirname(fullPath), { recursive: true });
598
+ const document = import_gray_matter4.default.stringify(customDoc.markdown.trim(), rest);
599
+ import_node_fs4.default.writeFileSync(fullPath, document);
561
600
  };
562
601
  var rmCustomDoc = (directory) => async (filePath) => {
563
602
  const withExtension = filePath.endsWith(".mdx") ? filePath : `${filePath}.mdx`;
@@ -566,14 +605,14 @@ var rmCustomDoc = (directory) => async (filePath) => {
566
605
 
567
606
  // src/teams.ts
568
607
  var import_promises9 = __toESM(require("fs/promises"));
569
- var import_node_fs4 = __toESM(require("fs"));
608
+ var import_node_fs5 = __toESM(require("fs"));
570
609
  var import_node_path9 = require("path");
571
- var import_gray_matter4 = __toESM(require("gray-matter"));
610
+ var import_gray_matter5 = __toESM(require("gray-matter"));
572
611
  var getTeam = (catalogDir) => async (id) => {
573
612
  const files = await getFiles(`${catalogDir}/${id}.md`);
574
613
  if (files.length == 0) return void 0;
575
614
  const file = files[0];
576
- const { data, content } = import_gray_matter4.default.read(file);
615
+ const { data, content } = import_gray_matter5.default.read(file);
577
616
  return {
578
617
  ...data,
579
618
  id: data.id,
@@ -585,7 +624,7 @@ var getTeams = (catalogDir) => async (options) => {
585
624
  const files = await getFiles(`${catalogDir}/teams/*.md`);
586
625
  if (files.length === 0) return [];
587
626
  return files.map((file) => {
588
- const { data, content } = import_gray_matter4.default.read(file);
627
+ const { data, content } = import_gray_matter5.default.read(file);
589
628
  return {
590
629
  ...data,
591
630
  id: data.id,
@@ -602,23 +641,23 @@ var writeTeam = (catalogDir) => async (team, options = {}) => {
602
641
  throw new Error(`Failed to write ${resource.id} (team) as it already exists`);
603
642
  }
604
643
  const { markdown, ...frontmatter } = resource;
605
- const document = import_gray_matter4.default.stringify(markdown, frontmatter);
606
- import_node_fs4.default.mkdirSync((0, import_node_path9.join)(catalogDir, ""), { recursive: true });
607
- import_node_fs4.default.writeFileSync((0, import_node_path9.join)(catalogDir, "", `${resource.id}.md`), document);
644
+ const document = import_gray_matter5.default.stringify(markdown, frontmatter);
645
+ import_node_fs5.default.mkdirSync((0, import_node_path9.join)(catalogDir, ""), { recursive: true });
646
+ import_node_fs5.default.writeFileSync((0, import_node_path9.join)(catalogDir, "", `${resource.id}.md`), document);
608
647
  };
609
648
  var rmTeamById = (catalogDir) => async (id) => {
610
649
  await import_promises9.default.rm((0, import_node_path9.join)(catalogDir, `${id}.md`), { recursive: true });
611
650
  };
612
651
 
613
652
  // src/users.ts
614
- var import_node_fs5 = __toESM(require("fs"));
653
+ var import_node_fs6 = __toESM(require("fs"));
615
654
  var import_node_path10 = require("path");
616
- var import_gray_matter5 = __toESM(require("gray-matter"));
655
+ var import_gray_matter6 = __toESM(require("gray-matter"));
617
656
  var getUser = (catalogDir) => async (id) => {
618
657
  const files = await getFiles(`${catalogDir}/${id}.md`);
619
658
  if (files.length == 0) return void 0;
620
659
  const file = files[0];
621
- const { data, content } = import_gray_matter5.default.read(file);
660
+ const { data, content } = import_gray_matter6.default.read(file);
622
661
  return {
623
662
  ...data,
624
663
  id: data.id,
@@ -631,7 +670,7 @@ var getUsers = (catalogDir) => async (options) => {
631
670
  const files = await getFiles(`${catalogDir}/users/*.md`);
632
671
  if (files.length === 0) return [];
633
672
  return files.map((file) => {
634
- const { data, content } = import_gray_matter5.default.read(file);
673
+ const { data, content } = import_gray_matter6.default.read(file);
635
674
  return {
636
675
  ...data,
637
676
  id: data.id,
@@ -649,16 +688,16 @@ var writeUser = (catalogDir) => async (user, options = {}) => {
649
688
  throw new Error(`Failed to write ${resource.id} (user) as it already exists`);
650
689
  }
651
690
  const { markdown, ...frontmatter } = resource;
652
- const document = import_gray_matter5.default.stringify(markdown, frontmatter);
653
- import_node_fs5.default.mkdirSync((0, import_node_path10.join)(catalogDir, ""), { recursive: true });
654
- import_node_fs5.default.writeFileSync((0, import_node_path10.join)(catalogDir, "", `${resource.id}.md`), document);
691
+ const document = import_gray_matter6.default.stringify(markdown, frontmatter);
692
+ import_node_fs6.default.mkdirSync((0, import_node_path10.join)(catalogDir, ""), { recursive: true });
693
+ import_node_fs6.default.writeFileSync((0, import_node_path10.join)(catalogDir, "", `${resource.id}.md`), document);
655
694
  };
656
695
  var rmUserById = (catalogDir) => async (id) => {
657
- import_node_fs5.default.rmSync((0, import_node_path10.join)(catalogDir, `${id}.md`), { recursive: true });
696
+ import_node_fs6.default.rmSync((0, import_node_path10.join)(catalogDir, `${id}.md`), { recursive: true });
658
697
  };
659
698
 
660
699
  // src/index.ts
661
- var index_default = (path2) => {
700
+ var index_default = (path3) => {
662
701
  return {
663
702
  /**
664
703
  * Returns an events from EventCatalog
@@ -666,13 +705,13 @@ var index_default = (path2) => {
666
705
  * @param version - Optional id of the version to get (supports semver)
667
706
  * @returns Event|Undefined
668
707
  */
669
- getEvent: getEvent((0, import_node_path11.join)(path2)),
708
+ getEvent: getEvent((0, import_node_path11.join)(path3)),
670
709
  /**
671
710
  * Returns all events from EventCatalog
672
711
  * @param latestOnly - optional boolean, set to true to get only latest versions
673
712
  * @returns Event[]|Undefined
674
713
  */
675
- getEvents: getEvents((0, import_node_path11.join)(path2)),
714
+ getEvents: getEvents((0, import_node_path11.join)(path3)),
676
715
  /**
677
716
  * Adds an event to EventCatalog
678
717
  *
@@ -680,7 +719,7 @@ var index_default = (path2) => {
680
719
  * @param options - Optional options to write the event
681
720
  *
682
721
  */
683
- writeEvent: writeEvent((0, import_node_path11.join)(path2, "events")),
722
+ writeEvent: writeEvent((0, import_node_path11.join)(path3, "events")),
684
723
  /**
685
724
  * Adds an event to a service in EventCatalog
686
725
  *
@@ -689,26 +728,26 @@ var index_default = (path2) => {
689
728
  * @param options - Optional options to write the event
690
729
  *
691
730
  */
692
- writeEventToService: writeEventToService((0, import_node_path11.join)(path2, "services")),
731
+ writeEventToService: writeEventToService((0, import_node_path11.join)(path3)),
693
732
  /**
694
733
  * Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
695
734
  *
696
735
  * @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
697
736
  *
698
737
  */
699
- rmEvent: rmEvent((0, import_node_path11.join)(path2, "events")),
738
+ rmEvent: rmEvent((0, import_node_path11.join)(path3, "events")),
700
739
  /**
701
740
  * Remove an event by an Event id
702
741
  *
703
742
  * @param id - The id of the event you want to remove
704
743
  *
705
744
  */
706
- rmEventById: rmEventById((0, import_node_path11.join)(path2)),
745
+ rmEventById: rmEventById((0, import_node_path11.join)(path3)),
707
746
  /**
708
747
  * Moves a given event id to the version directory
709
748
  * @param directory
710
749
  */
711
- versionEvent: versionEvent((0, import_node_path11.join)(path2)),
750
+ versionEvent: versionEvent((0, import_node_path11.join)(path3)),
712
751
  /**
713
752
  * Adds a file to the given event
714
753
  * @param id - The id of the event to add the file to
@@ -716,7 +755,7 @@ var index_default = (path2) => {
716
755
  * @param version - Optional version of the event to add the file to
717
756
  * @returns
718
757
  */
719
- addFileToEvent: addFileToEvent((0, import_node_path11.join)(path2)),
758
+ addFileToEvent: addFileToEvent((0, import_node_path11.join)(path3)),
720
759
  /**
721
760
  * Adds a schema to the given event
722
761
  * @param id - The id of the event to add the schema to
@@ -724,14 +763,14 @@ var index_default = (path2) => {
724
763
  * @param version - Optional version of the event to add the schema to
725
764
  * @returns
726
765
  */
727
- addSchemaToEvent: addSchemaToEvent((0, import_node_path11.join)(path2)),
766
+ addSchemaToEvent: addSchemaToEvent((0, import_node_path11.join)(path3)),
728
767
  /**
729
768
  * Check to see if an event version exists
730
769
  * @param id - The id of the event
731
770
  * @param version - The version of the event (supports semver)
732
771
  * @returns
733
772
  */
734
- eventHasVersion: eventHasVersion((0, import_node_path11.join)(path2)),
773
+ eventHasVersion: eventHasVersion((0, import_node_path11.join)(path3)),
735
774
  /**
736
775
  * ================================
737
776
  * Commands
@@ -743,13 +782,13 @@ var index_default = (path2) => {
743
782
  * @param version - Optional id of the version to get (supports semver)
744
783
  * @returns Command|Undefined
745
784
  */
746
- getCommand: getCommand((0, import_node_path11.join)(path2)),
785
+ getCommand: getCommand((0, import_node_path11.join)(path3)),
747
786
  /**
748
787
  * Returns all commands from EventCatalog
749
788
  * @param latestOnly - optional boolean, set to true to get only latest versions
750
789
  * @returns Command[]|Undefined
751
790
  */
752
- getCommands: getCommands((0, import_node_path11.join)(path2)),
791
+ getCommands: getCommands((0, import_node_path11.join)(path3)),
753
792
  /**
754
793
  * Adds an command to EventCatalog
755
794
  *
@@ -757,7 +796,7 @@ var index_default = (path2) => {
757
796
  * @param options - Optional options to write the command
758
797
  *
759
798
  */
760
- writeCommand: writeCommand((0, import_node_path11.join)(path2, "commands")),
799
+ writeCommand: writeCommand((0, import_node_path11.join)(path3, "commands")),
761
800
  /**
762
801
  * Adds a command to a service in EventCatalog
763
802
  *
@@ -766,26 +805,26 @@ var index_default = (path2) => {
766
805
  * @param options - Optional options to write the command
767
806
  *
768
807
  */
769
- writeCommandToService: writeCommandToService((0, import_node_path11.join)(path2, "services")),
808
+ writeCommandToService: writeCommandToService((0, import_node_path11.join)(path3)),
770
809
  /**
771
810
  * Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
772
811
  *
773
812
  * @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
774
813
  *
775
814
  */
776
- rmCommand: rmCommand((0, import_node_path11.join)(path2, "commands")),
815
+ rmCommand: rmCommand((0, import_node_path11.join)(path3, "commands")),
777
816
  /**
778
817
  * Remove an command by an Event id
779
818
  *
780
819
  * @param id - The id of the command you want to remove
781
820
  *
782
821
  */
783
- rmCommandById: rmCommandById((0, import_node_path11.join)(path2)),
822
+ rmCommandById: rmCommandById((0, import_node_path11.join)(path3)),
784
823
  /**
785
824
  * Moves a given command id to the version directory
786
825
  * @param directory
787
826
  */
788
- versionCommand: versionCommand((0, import_node_path11.join)(path2)),
827
+ versionCommand: versionCommand((0, import_node_path11.join)(path3)),
789
828
  /**
790
829
  * Adds a file to the given command
791
830
  * @param id - The id of the command to add the file to
@@ -793,7 +832,7 @@ var index_default = (path2) => {
793
832
  * @param version - Optional version of the command to add the file to
794
833
  * @returns
795
834
  */
796
- addFileToCommand: addFileToCommand((0, import_node_path11.join)(path2)),
835
+ addFileToCommand: addFileToCommand((0, import_node_path11.join)(path3)),
797
836
  /**
798
837
  * Adds a schema to the given command
799
838
  * @param id - The id of the command to add the schema to
@@ -801,14 +840,14 @@ var index_default = (path2) => {
801
840
  * @param version - Optional version of the command to add the schema to
802
841
  * @returns
803
842
  */
804
- addSchemaToCommand: addSchemaToCommand((0, import_node_path11.join)(path2)),
843
+ addSchemaToCommand: addSchemaToCommand((0, import_node_path11.join)(path3)),
805
844
  /**
806
845
  * Check to see if a command version exists
807
846
  * @param id - The id of the command
808
847
  * @param version - The version of the command (supports semver)
809
848
  * @returns
810
849
  */
811
- commandHasVersion: commandHasVersion((0, import_node_path11.join)(path2)),
850
+ commandHasVersion: commandHasVersion((0, import_node_path11.join)(path3)),
812
851
  /**
813
852
  * ================================
814
853
  * Queries
@@ -820,13 +859,13 @@ var index_default = (path2) => {
820
859
  * @param version - Optional id of the version to get (supports semver)
821
860
  * @returns Query|Undefined
822
861
  */
823
- getQuery: getQuery((0, import_node_path11.join)(path2)),
862
+ getQuery: getQuery((0, import_node_path11.join)(path3)),
824
863
  /**
825
864
  * Returns all queries from EventCatalog
826
865
  * @param latestOnly - optional boolean, set to true to get only latest versions
827
866
  * @returns Query[]|Undefined
828
867
  */
829
- getQueries: getQueries((0, import_node_path11.join)(path2)),
868
+ getQueries: getQueries((0, import_node_path11.join)(path3)),
830
869
  /**
831
870
  * Adds a query to EventCatalog
832
871
  *
@@ -834,7 +873,7 @@ var index_default = (path2) => {
834
873
  * @param options - Optional options to write the event
835
874
  *
836
875
  */
837
- writeQuery: writeQuery((0, import_node_path11.join)(path2, "queries")),
876
+ writeQuery: writeQuery((0, import_node_path11.join)(path3, "queries")),
838
877
  /**
839
878
  * Adds a query to a service in EventCatalog
840
879
  *
@@ -843,26 +882,26 @@ var index_default = (path2) => {
843
882
  * @param options - Optional options to write the query
844
883
  *
845
884
  */
846
- writeQueryToService: writeQueryToService((0, import_node_path11.join)(path2, "services")),
885
+ writeQueryToService: writeQueryToService((0, import_node_path11.join)(path3)),
847
886
  /**
848
887
  * Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
849
888
  *
850
889
  * @param path - The path to your query, e.g. `/Orders/GetOrder`
851
890
  *
852
891
  */
853
- rmQuery: rmQuery((0, import_node_path11.join)(path2, "queries")),
892
+ rmQuery: rmQuery((0, import_node_path11.join)(path3, "queries")),
854
893
  /**
855
894
  * Remove a query by a Query id
856
895
  *
857
896
  * @param id - The id of the query you want to remove
858
897
  *
859
898
  */
860
- rmQueryById: rmQueryById((0, import_node_path11.join)(path2)),
899
+ rmQueryById: rmQueryById((0, import_node_path11.join)(path3)),
861
900
  /**
862
901
  * Moves a given query id to the version directory
863
902
  * @param directory
864
903
  */
865
- versionQuery: versionQuery((0, import_node_path11.join)(path2)),
904
+ versionQuery: versionQuery((0, import_node_path11.join)(path3)),
866
905
  /**
867
906
  * Adds a file to the given query
868
907
  * @param id - The id of the query to add the file to
@@ -870,7 +909,7 @@ var index_default = (path2) => {
870
909
  * @param version - Optional version of the query to add the file to
871
910
  * @returns
872
911
  */
873
- addFileToQuery: addFileToQuery((0, import_node_path11.join)(path2)),
912
+ addFileToQuery: addFileToQuery((0, import_node_path11.join)(path3)),
874
913
  /**
875
914
  * Adds a schema to the given query
876
915
  * @param id - The id of the query to add the schema to
@@ -878,14 +917,14 @@ var index_default = (path2) => {
878
917
  * @param version - Optional version of the query to add the schema to
879
918
  * @returns
880
919
  */
881
- addSchemaToQuery: addSchemaToQuery((0, import_node_path11.join)(path2)),
920
+ addSchemaToQuery: addSchemaToQuery((0, import_node_path11.join)(path3)),
882
921
  /**
883
922
  * Check to see if an query version exists
884
923
  * @param id - The id of the query
885
924
  * @param version - The version of the query (supports semver)
886
925
  * @returns
887
926
  */
888
- queryHasVersion: queryHasVersion((0, import_node_path11.join)(path2)),
927
+ queryHasVersion: queryHasVersion((0, import_node_path11.join)(path3)),
889
928
  /**
890
929
  * ================================
891
930
  * Channels
@@ -897,13 +936,13 @@ var index_default = (path2) => {
897
936
  * @param version - Optional id of the version to get (supports semver)
898
937
  * @returns Channel|Undefined
899
938
  */
900
- getChannel: getChannel((0, import_node_path11.join)(path2)),
939
+ getChannel: getChannel((0, import_node_path11.join)(path3)),
901
940
  /**
902
941
  * Returns all channels from EventCatalog
903
942
  * @param latestOnly - optional boolean, set to true to get only latest versions
904
943
  * @returns Channel[]|Undefined
905
944
  */
906
- getChannels: getChannels((0, import_node_path11.join)(path2)),
945
+ getChannels: getChannels((0, import_node_path11.join)(path3)),
907
946
  /**
908
947
  * Adds an channel to EventCatalog
909
948
  *
@@ -911,33 +950,33 @@ var index_default = (path2) => {
911
950
  * @param options - Optional options to write the channel
912
951
  *
913
952
  */
914
- writeChannel: writeChannel((0, import_node_path11.join)(path2, "channels")),
953
+ writeChannel: writeChannel((0, import_node_path11.join)(path3, "channels")),
915
954
  /**
916
955
  * Remove an channel to EventCatalog (modeled on the standard POSIX rm utility)
917
956
  *
918
957
  * @param path - The path to your channel, e.g. `/Inventory/InventoryAdjusted`
919
958
  *
920
959
  */
921
- rmChannel: rmChannel((0, import_node_path11.join)(path2, "channels")),
960
+ rmChannel: rmChannel((0, import_node_path11.join)(path3, "channels")),
922
961
  /**
923
962
  * Remove an channel by an Event id
924
963
  *
925
964
  * @param id - The id of the channel you want to remove
926
965
  *
927
966
  */
928
- rmChannelById: rmChannelById((0, import_node_path11.join)(path2)),
967
+ rmChannelById: rmChannelById((0, import_node_path11.join)(path3)),
929
968
  /**
930
969
  * Moves a given channel id to the version directory
931
970
  * @param directory
932
971
  */
933
- versionChannel: versionChannel((0, import_node_path11.join)(path2)),
972
+ versionChannel: versionChannel((0, import_node_path11.join)(path3)),
934
973
  /**
935
974
  * Check to see if a channel version exists
936
975
  * @param id - The id of the channel
937
976
  * @param version - The version of the channel (supports semver)
938
977
  * @returns
939
978
  */
940
- channelHasVersion: channelHasVersion((0, import_node_path11.join)(path2)),
979
+ channelHasVersion: channelHasVersion((0, import_node_path11.join)(path3)),
941
980
  /**
942
981
  * Add a channel to an event
943
982
  *
@@ -954,7 +993,7 @@ var index_default = (path2) => {
954
993
  *
955
994
  * ```
956
995
  */
957
- addEventToChannel: addMessageToChannel((0, import_node_path11.join)(path2), "events"),
996
+ addEventToChannel: addMessageToChannel((0, import_node_path11.join)(path3), "events"),
958
997
  /**
959
998
  * Add a channel to an command
960
999
  *
@@ -971,7 +1010,7 @@ var index_default = (path2) => {
971
1010
  *
972
1011
  * ```
973
1012
  */
974
- addCommandToChannel: addMessageToChannel((0, import_node_path11.join)(path2), "commands"),
1013
+ addCommandToChannel: addMessageToChannel((0, import_node_path11.join)(path3), "commands"),
975
1014
  /**
976
1015
  * Add a channel to an query
977
1016
  *
@@ -988,7 +1027,7 @@ var index_default = (path2) => {
988
1027
  *
989
1028
  * ```
990
1029
  */
991
- addQueryToChannel: addMessageToChannel((0, import_node_path11.join)(path2), "queries"),
1030
+ addQueryToChannel: addMessageToChannel((0, import_node_path11.join)(path3), "queries"),
992
1031
  /**
993
1032
  * ================================
994
1033
  * SERVICES
@@ -1001,14 +1040,14 @@ var index_default = (path2) => {
1001
1040
  * @param options - Optional options to write the event
1002
1041
  *
1003
1042
  */
1004
- writeService: writeService((0, import_node_path11.join)(path2, "services")),
1043
+ writeService: writeService((0, import_node_path11.join)(path3, "services")),
1005
1044
  /**
1006
1045
  * Adds a versioned service to EventCatalog
1007
1046
  *
1008
1047
  * @param service - The service to write
1009
1048
  *
1010
1049
  */
1011
- writeVersionedService: writeVersionedService((0, import_node_path11.join)(path2, "services")),
1050
+ writeVersionedService: writeVersionedService((0, import_node_path11.join)(path3, "services")),
1012
1051
  /**
1013
1052
  * Adds a service to a domain in EventCatalog
1014
1053
  *
@@ -1017,39 +1056,39 @@ var index_default = (path2) => {
1017
1056
  * @param options - Optional options to write the event
1018
1057
  *
1019
1058
  */
1020
- writeServiceToDomain: writeServiceToDomain((0, import_node_path11.join)(path2, "domains")),
1059
+ writeServiceToDomain: writeServiceToDomain((0, import_node_path11.join)(path3, "domains")),
1021
1060
  /**
1022
1061
  * Returns a service from EventCatalog
1023
1062
  * @param id - The id of the service to retrieve
1024
1063
  * @param version - Optional id of the version to get (supports semver)
1025
1064
  * @returns Service|Undefined
1026
1065
  */
1027
- getService: getService((0, import_node_path11.join)(path2)),
1066
+ getService: getService((0, import_node_path11.join)(path3)),
1028
1067
  /**
1029
1068
  * Returns all services from EventCatalog
1030
1069
  * @param latestOnly - optional boolean, set to true to get only latest versions
1031
1070
  * @returns Service[]|Undefined
1032
1071
  */
1033
- getServices: getServices((0, import_node_path11.join)(path2)),
1072
+ getServices: getServices((0, import_node_path11.join)(path3)),
1034
1073
  /**
1035
1074
  * Moves a given service id to the version directory
1036
1075
  * @param directory
1037
1076
  */
1038
- versionService: versionService((0, import_node_path11.join)(path2)),
1077
+ versionService: versionService((0, import_node_path11.join)(path3)),
1039
1078
  /**
1040
1079
  * Remove a service from EventCatalog (modeled on the standard POSIX rm utility)
1041
1080
  *
1042
1081
  * @param path - The path to your service, e.g. `/InventoryService`
1043
1082
  *
1044
1083
  */
1045
- rmService: rmService((0, import_node_path11.join)(path2, "services")),
1084
+ rmService: rmService((0, import_node_path11.join)(path3, "services")),
1046
1085
  /**
1047
1086
  * Remove an service by an service id
1048
1087
  *
1049
1088
  * @param id - The id of the service you want to remove
1050
1089
  *
1051
1090
  */
1052
- rmServiceById: rmServiceById((0, import_node_path11.join)(path2)),
1091
+ rmServiceById: rmServiceById((0, import_node_path11.join)(path3)),
1053
1092
  /**
1054
1093
  * Adds a file to the given service
1055
1094
  * @param id - The id of the service to add the file to
@@ -1057,21 +1096,21 @@ var index_default = (path2) => {
1057
1096
  * @param version - Optional version of the service to add the file to
1058
1097
  * @returns
1059
1098
  */
1060
- addFileToService: addFileToService((0, import_node_path11.join)(path2)),
1099
+ addFileToService: addFileToService((0, import_node_path11.join)(path3)),
1061
1100
  /**
1062
1101
  * Returns the specifications for a given service
1063
1102
  * @param id - The id of the service to retrieve the specifications for
1064
1103
  * @param version - Optional version of the service
1065
1104
  * @returns
1066
1105
  */
1067
- getSpecificationFilesForService: getSpecificationFilesForService((0, import_node_path11.join)(path2)),
1106
+ getSpecificationFilesForService: getSpecificationFilesForService((0, import_node_path11.join)(path3)),
1068
1107
  /**
1069
1108
  * Check to see if a service version exists
1070
1109
  * @param id - The id of the service
1071
1110
  * @param version - The version of the service (supports semver)
1072
1111
  * @returns
1073
1112
  */
1074
- serviceHasVersion: serviceHasVersion((0, import_node_path11.join)(path2)),
1113
+ serviceHasVersion: serviceHasVersion((0, import_node_path11.join)(path3)),
1075
1114
  /**
1076
1115
  * Add an event to a service by it's id.
1077
1116
  *
@@ -1091,7 +1130,7 @@ var index_default = (path2) => {
1091
1130
  *
1092
1131
  * ```
1093
1132
  */
1094
- addEventToService: addMessageToService((0, import_node_path11.join)(path2)),
1133
+ addEventToService: addMessageToService((0, import_node_path11.join)(path3)),
1095
1134
  /**
1096
1135
  * Add a command to a service by it's id.
1097
1136
  *
@@ -1111,7 +1150,7 @@ var index_default = (path2) => {
1111
1150
  *
1112
1151
  * ```
1113
1152
  */
1114
- addCommandToService: addMessageToService((0, import_node_path11.join)(path2)),
1153
+ addCommandToService: addMessageToService((0, import_node_path11.join)(path3)),
1115
1154
  /**
1116
1155
  * Add a query to a service by it's id.
1117
1156
  *
@@ -1131,7 +1170,7 @@ var index_default = (path2) => {
1131
1170
  *
1132
1171
  * ```
1133
1172
  */
1134
- addQueryToService: addMessageToService((0, import_node_path11.join)(path2)),
1173
+ addQueryToService: addMessageToService((0, import_node_path11.join)(path3)),
1135
1174
  /**
1136
1175
  * ================================
1137
1176
  * Domains
@@ -1144,39 +1183,39 @@ var index_default = (path2) => {
1144
1183
  * @param options - Optional options to write the event
1145
1184
  *
1146
1185
  */
1147
- writeDomain: writeDomain((0, import_node_path11.join)(path2, "domains")),
1186
+ writeDomain: writeDomain((0, import_node_path11.join)(path3, "domains")),
1148
1187
  /**
1149
1188
  * Returns a domain from EventCatalog
1150
1189
  * @param id - The id of the domain to retrieve
1151
1190
  * @param version - Optional id of the version to get (supports semver)
1152
1191
  * @returns Domain|Undefined
1153
1192
  */
1154
- getDomain: getDomain((0, import_node_path11.join)(path2, "domains")),
1193
+ getDomain: getDomain((0, import_node_path11.join)(path3, "domains")),
1155
1194
  /**
1156
1195
  * Returns all domains from EventCatalog
1157
1196
  * @param latestOnly - optional boolean, set to true to get only latest versions
1158
1197
  * @returns Domain[]|Undefined
1159
1198
  */
1160
- getDomains: getDomains((0, import_node_path11.join)(path2)),
1199
+ getDomains: getDomains((0, import_node_path11.join)(path3)),
1161
1200
  /**
1162
1201
  * Moves a given domain id to the version directory
1163
1202
  * @param directory
1164
1203
  */
1165
- versionDomain: versionDomain((0, import_node_path11.join)(path2, "domains")),
1204
+ versionDomain: versionDomain((0, import_node_path11.join)(path3, "domains")),
1166
1205
  /**
1167
1206
  * Remove a domain from EventCatalog (modeled on the standard POSIX rm utility)
1168
1207
  *
1169
1208
  * @param path - The path to your domain, e.g. `/Payment`
1170
1209
  *
1171
1210
  */
1172
- rmDomain: rmDomain((0, import_node_path11.join)(path2, "domains")),
1211
+ rmDomain: rmDomain((0, import_node_path11.join)(path3, "domains")),
1173
1212
  /**
1174
1213
  * Remove an service by an domain id
1175
1214
  *
1176
1215
  * @param id - The id of the domain you want to remove
1177
1216
  *
1178
1217
  */
1179
- rmDomainById: rmDomainById((0, import_node_path11.join)(path2, "domains")),
1218
+ rmDomainById: rmDomainById((0, import_node_path11.join)(path3, "domains")),
1180
1219
  /**
1181
1220
  * Adds a file to the given domain
1182
1221
  * @param id - The id of the domain to add the file to
@@ -1184,14 +1223,28 @@ var index_default = (path2) => {
1184
1223
  * @param version - Optional version of the domain to add the file to
1185
1224
  * @returns
1186
1225
  */
1187
- addFileToDomain: addFileToDomain((0, import_node_path11.join)(path2, "domains")),
1226
+ addFileToDomain: addFileToDomain((0, import_node_path11.join)(path3, "domains")),
1227
+ /**
1228
+ * Adds an ubiquitous language dictionary to a domain
1229
+ * @param id - The id of the domain to add the ubiquitous language to
1230
+ * @param ubiquitousLanguageDictionary - The ubiquitous language dictionary to add
1231
+ * @param version - Optional version of the domain to add the ubiquitous language to
1232
+ */
1233
+ addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain((0, import_node_path11.join)(path3, "domains")),
1234
+ /**
1235
+ * Get the ubiquitous language dictionary from a domain
1236
+ * @param id - The id of the domain to get the ubiquitous language from
1237
+ * @param version - Optional version of the domain to get the ubiquitous language from
1238
+ * @returns
1239
+ */
1240
+ getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain((0, import_node_path11.join)(path3, "domains")),
1188
1241
  /**
1189
1242
  * Check to see if a domain version exists
1190
1243
  * @param id - The id of the domain
1191
1244
  * @param version - The version of the domain (supports semver)
1192
1245
  * @returns
1193
1246
  */
1194
- domainHasVersion: domainHasVersion((0, import_node_path11.join)(path2)),
1247
+ domainHasVersion: domainHasVersion((0, import_node_path11.join)(path3)),
1195
1248
  /**
1196
1249
  * Adds a given service to a domain
1197
1250
  * @param id - The id of the domain
@@ -1199,7 +1252,7 @@ var index_default = (path2) => {
1199
1252
  * @param version - (Optional) The version of the domain to add the service to
1200
1253
  * @returns
1201
1254
  */
1202
- addServiceToDomain: addServiceToDomain((0, import_node_path11.join)(path2, "domains")),
1255
+ addServiceToDomain: addServiceToDomain((0, import_node_path11.join)(path3, "domains")),
1203
1256
  /**
1204
1257
  * ================================
1205
1258
  * Teams
@@ -1212,25 +1265,25 @@ var index_default = (path2) => {
1212
1265
  * @param options - Optional options to write the team
1213
1266
  *
1214
1267
  */
1215
- writeTeam: writeTeam((0, import_node_path11.join)(path2, "teams")),
1268
+ writeTeam: writeTeam((0, import_node_path11.join)(path3, "teams")),
1216
1269
  /**
1217
1270
  * Returns a team from EventCatalog
1218
1271
  * @param id - The id of the team to retrieve
1219
1272
  * @returns Team|Undefined
1220
1273
  */
1221
- getTeam: getTeam((0, import_node_path11.join)(path2, "teams")),
1274
+ getTeam: getTeam((0, import_node_path11.join)(path3, "teams")),
1222
1275
  /**
1223
1276
  * Returns all teams from EventCatalog
1224
1277
  * @returns Team[]|Undefined
1225
1278
  */
1226
- getTeams: getTeams((0, import_node_path11.join)(path2)),
1279
+ getTeams: getTeams((0, import_node_path11.join)(path3)),
1227
1280
  /**
1228
1281
  * Remove a team by the team id
1229
1282
  *
1230
1283
  * @param id - The id of the team you want to remove
1231
1284
  *
1232
1285
  */
1233
- rmTeamById: rmTeamById((0, import_node_path11.join)(path2, "teams")),
1286
+ rmTeamById: rmTeamById((0, import_node_path11.join)(path3, "teams")),
1234
1287
  /**
1235
1288
  * ================================
1236
1289
  * Users
@@ -1243,25 +1296,25 @@ var index_default = (path2) => {
1243
1296
  * @param options - Optional options to write the user
1244
1297
  *
1245
1298
  */
1246
- writeUser: writeUser((0, import_node_path11.join)(path2, "users")),
1299
+ writeUser: writeUser((0, import_node_path11.join)(path3, "users")),
1247
1300
  /**
1248
1301
  * Returns a user from EventCatalog
1249
1302
  * @param id - The id of the user to retrieve
1250
1303
  * @returns User|Undefined
1251
1304
  */
1252
- getUser: getUser((0, import_node_path11.join)(path2, "users")),
1305
+ getUser: getUser((0, import_node_path11.join)(path3, "users")),
1253
1306
  /**
1254
1307
  * Returns all user from EventCatalog
1255
1308
  * @returns User[]|Undefined
1256
1309
  */
1257
- getUsers: getUsers((0, import_node_path11.join)(path2)),
1310
+ getUsers: getUsers((0, import_node_path11.join)(path3)),
1258
1311
  /**
1259
1312
  * Remove a user by the user id
1260
1313
  *
1261
1314
  * @param id - The id of the user you want to remove
1262
1315
  *
1263
1316
  */
1264
- rmUserById: rmUserById((0, import_node_path11.join)(path2, "users")),
1317
+ rmUserById: rmUserById((0, import_node_path11.join)(path3, "users")),
1265
1318
  /**
1266
1319
  * ================================
1267
1320
  * Custom Docs
@@ -1272,26 +1325,26 @@ var index_default = (path2) => {
1272
1325
  * @param path - The path to the custom doc to retrieve
1273
1326
  * @returns CustomDoc|Undefined
1274
1327
  */
1275
- getCustomDoc: getCustomDoc((0, import_node_path11.join)(path2, "docs")),
1328
+ getCustomDoc: getCustomDoc((0, import_node_path11.join)(path3, "docs")),
1276
1329
  /**
1277
1330
  * Returns all custom docs from EventCatalog
1278
1331
  * @param options - Optional options to get custom docs from a specific path
1279
1332
  * @returns CustomDoc[]|Undefined
1280
1333
  */
1281
- getCustomDocs: getCustomDocs((0, import_node_path11.join)(path2, "docs")),
1334
+ getCustomDocs: getCustomDocs((0, import_node_path11.join)(path3, "docs")),
1282
1335
  /**
1283
1336
  * Writes a custom doc to EventCatalog
1284
1337
  * @param customDoc - The custom doc to write
1285
1338
  * @param options - Optional options to write the custom doc
1286
1339
  *
1287
1340
  */
1288
- writeCustomDoc: writeCustomDoc((0, import_node_path11.join)(path2, "docs")),
1341
+ writeCustomDoc: writeCustomDoc((0, import_node_path11.join)(path3, "docs")),
1289
1342
  /**
1290
1343
  * Removes a custom doc from EventCatalog
1291
1344
  * @param path - The path to the custom doc to remove
1292
1345
  *
1293
1346
  */
1294
- rmCustomDoc: rmCustomDoc((0, import_node_path11.join)(path2, "docs"))
1347
+ rmCustomDoc: rmCustomDoc((0, import_node_path11.join)(path3, "docs"))
1295
1348
  };
1296
1349
  };
1297
1350
  //# sourceMappingURL=index.js.map