@eventcatalog/sdk 2.5.4 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/channels.js +2 -1
- package/dist/channels.js.map +1 -1
- package/dist/channels.mjs +2 -1
- package/dist/channels.mjs.map +1 -1
- package/dist/commands.js +2 -1
- package/dist/commands.js.map +1 -1
- package/dist/commands.mjs +2 -1
- package/dist/commands.mjs.map +1 -1
- package/dist/custom-docs.js.map +1 -1
- package/dist/custom-docs.mjs.map +1 -1
- package/dist/domains.js +2 -1
- package/dist/domains.js.map +1 -1
- package/dist/domains.mjs +2 -1
- package/dist/domains.mjs.map +1 -1
- package/dist/eventcatalog.js +204 -110
- package/dist/eventcatalog.js.map +1 -1
- package/dist/eventcatalog.mjs +200 -106
- package/dist/eventcatalog.mjs.map +1 -1
- package/dist/events.d.mts +4 -4
- package/dist/events.d.ts +4 -4
- package/dist/events.js +2 -1
- package/dist/events.js.map +1 -1
- package/dist/events.mjs +2 -1
- package/dist/events.mjs.map +1 -1
- package/dist/index.d.mts +49 -12
- package/dist/index.d.ts +49 -12
- package/dist/index.js +204 -110
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +200 -106
- package/dist/index.mjs.map +1 -1
- package/dist/messages.d.mts +37 -0
- package/dist/messages.d.ts +37 -0
- package/dist/messages.js +271 -0
- package/dist/messages.js.map +1 -0
- package/dist/messages.mjs +235 -0
- package/dist/messages.mjs.map +1 -0
- package/dist/queries.js +2 -1
- package/dist/queries.js.map +1 -1
- package/dist/queries.mjs +2 -1
- package/dist/queries.mjs.map +1 -1
- package/dist/services.js +2 -1
- package/dist/services.js.map +1 -1
- package/dist/services.mjs +2 -1
- package/dist/services.mjs.map +1 -1
- package/dist/teams.js.map +1 -1
- package/dist/teams.mjs.map +1 -1
- package/dist/types.d.d.mts +2 -2
- package/dist/types.d.d.ts +2 -2
- package/dist/types.d.js.map +1 -1
- package/dist/users.js.map +1 -1
- package/dist/users.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ __export(index_exports, {
|
|
|
33
33
|
default: () => index_default
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(index_exports);
|
|
36
|
-
var
|
|
36
|
+
var import_node_path13 = require("path");
|
|
37
37
|
|
|
38
38
|
// src/events.ts
|
|
39
39
|
var import_promises2 = __toESM(require("fs/promises"));
|
|
@@ -107,7 +107,8 @@ var readMdxFile = async (path4) => {
|
|
|
107
107
|
return { ...frontmatter, markdown };
|
|
108
108
|
};
|
|
109
109
|
var searchFilesForId = async (files, id, version) => {
|
|
110
|
-
const
|
|
110
|
+
const escapedId = id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
111
|
+
const idRegex = new RegExp(`^id:\\s*(['"]|>-)?\\s*${escapedId}['"]?\\s*$`, "m");
|
|
111
112
|
const versionRegex = new RegExp(`^version:\\s*['"]?${version}['"]?\\s*$`, "m");
|
|
112
113
|
const matches = files.map((file) => {
|
|
113
114
|
const content = import_node_fs.default.readFileSync(file, "utf-8");
|
|
@@ -324,6 +325,12 @@ var getFileFromResource = async (catalogDir, id, file, version) => {
|
|
|
324
325
|
var getVersionedDirectory = (sourceDirectory, version) => {
|
|
325
326
|
return (0, import_path.join)(sourceDirectory, "versioned", version);
|
|
326
327
|
};
|
|
328
|
+
var isLatestVersion = async (catalogDir, id, version) => {
|
|
329
|
+
const resource = await getResource(catalogDir, id, version);
|
|
330
|
+
if (!resource) return false;
|
|
331
|
+
const pathToResource = await getResourcePath(catalogDir, id, version);
|
|
332
|
+
return !pathToResource?.relativePath.replace(/\\/g, "/").includes("/versioned/");
|
|
333
|
+
};
|
|
327
334
|
|
|
328
335
|
// src/events.ts
|
|
329
336
|
var getEvent = (directory) => async (id, version, options) => getResource(directory, id, version, { type: "event", ...options });
|
|
@@ -665,14 +672,82 @@ var addMessageToChannel = (directory, collection) => async (id, _message, versio
|
|
|
665
672
|
await writeMessage(pathToResource)(message, { format: extension === ".md" ? "md" : "mdx" });
|
|
666
673
|
};
|
|
667
674
|
|
|
675
|
+
// src/messages.ts
|
|
676
|
+
var import_node_path8 = require("path");
|
|
677
|
+
var import_gray_matter4 = __toESM(require("gray-matter"));
|
|
678
|
+
var getMessageBySchemaPath = (directory) => async (path4, options) => {
|
|
679
|
+
const pathToMessage = (0, import_node_path8.dirname)(path4);
|
|
680
|
+
try {
|
|
681
|
+
const files = await getFiles(`${pathToMessage}/index.{md,mdx}`);
|
|
682
|
+
if (!files || files.length === 0) {
|
|
683
|
+
throw new Error(`No message definition file (index.md or index.mdx) found in directory: ${pathToMessage}`);
|
|
684
|
+
}
|
|
685
|
+
const messageFile = files[0];
|
|
686
|
+
const { data } = import_gray_matter4.default.read(messageFile);
|
|
687
|
+
const { id, version } = data;
|
|
688
|
+
if (!id || !version) {
|
|
689
|
+
throw new Error(`Message definition file at ${messageFile} is missing 'id' or 'version' in its frontmatter.`);
|
|
690
|
+
}
|
|
691
|
+
const message = await getResource(directory, id, version, { type: "message", ...options });
|
|
692
|
+
if (!message) {
|
|
693
|
+
throw new Error(`Message resource with id '${id}' and version '${version}' not found, as referenced in ${messageFile}.`);
|
|
694
|
+
}
|
|
695
|
+
return message;
|
|
696
|
+
} catch (error) {
|
|
697
|
+
console.error(`Failed to get message for schema path ${path4}. Error processing directory ${pathToMessage}:`, error);
|
|
698
|
+
if (error instanceof Error) {
|
|
699
|
+
error.message = `Failed to retrieve message from ${pathToMessage}: ${error.message}`;
|
|
700
|
+
throw error;
|
|
701
|
+
}
|
|
702
|
+
throw new Error(`Failed to retrieve message from ${pathToMessage} due to an unknown error.`);
|
|
703
|
+
}
|
|
704
|
+
};
|
|
705
|
+
var getProducersAndConsumersForMessage = (directory) => async (id, version) => {
|
|
706
|
+
const services = await getServices(directory)({ latestOnly: true });
|
|
707
|
+
const message = await getResource(directory, id, version, { type: "message" });
|
|
708
|
+
const isMessageLatestVersion = await isLatestVersion(directory, id, version);
|
|
709
|
+
if (!message) {
|
|
710
|
+
throw new Error(`Message resource with id '${id}' and version '${version}' not found.`);
|
|
711
|
+
}
|
|
712
|
+
const producers = [];
|
|
713
|
+
const consumers = [];
|
|
714
|
+
for (const service of services) {
|
|
715
|
+
const servicePublishesMessage = service.sends?.some((_message) => {
|
|
716
|
+
if (_message.version) {
|
|
717
|
+
return _message.id === message.id && _message.version === message.version;
|
|
718
|
+
}
|
|
719
|
+
if (isMessageLatestVersion && _message.id === message.id) {
|
|
720
|
+
return true;
|
|
721
|
+
}
|
|
722
|
+
return false;
|
|
723
|
+
});
|
|
724
|
+
const serviceSubscribesToMessage = service.receives?.some((_message) => {
|
|
725
|
+
if (_message.version) {
|
|
726
|
+
return _message.id === message.id && _message.version === message.version;
|
|
727
|
+
}
|
|
728
|
+
if (isMessageLatestVersion && _message.id === message.id) {
|
|
729
|
+
return true;
|
|
730
|
+
}
|
|
731
|
+
return false;
|
|
732
|
+
});
|
|
733
|
+
if (servicePublishesMessage) {
|
|
734
|
+
producers.push(service);
|
|
735
|
+
}
|
|
736
|
+
if (serviceSubscribesToMessage) {
|
|
737
|
+
consumers.push(service);
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
return { producers, consumers };
|
|
741
|
+
};
|
|
742
|
+
|
|
668
743
|
// src/custom-docs.ts
|
|
669
|
-
var
|
|
744
|
+
var import_node_path9 = __toESM(require("path"));
|
|
670
745
|
var import_node_fs4 = __toESM(require("fs"));
|
|
671
746
|
var import_promises8 = __toESM(require("fs/promises"));
|
|
672
|
-
var
|
|
747
|
+
var import_gray_matter5 = __toESM(require("gray-matter"));
|
|
673
748
|
var import_slugify = __toESM(require("slugify"));
|
|
674
749
|
var getCustomDoc = (directory) => async (filePath) => {
|
|
675
|
-
const fullPath =
|
|
750
|
+
const fullPath = import_node_path9.default.join(directory, filePath);
|
|
676
751
|
const fullPathWithExtension = fullPath.endsWith(".mdx") ? fullPath : `${fullPath}.mdx`;
|
|
677
752
|
const fileExists = import_node_fs4.default.existsSync(fullPathWithExtension);
|
|
678
753
|
if (!fileExists) {
|
|
@@ -691,26 +766,26 @@ var writeCustomDoc = (directory) => async (customDoc, options = { path: "" }) =>
|
|
|
691
766
|
const { fileName, ...rest } = customDoc;
|
|
692
767
|
const name = fileName || (0, import_slugify.default)(customDoc.title, { lower: true });
|
|
693
768
|
const withExtension = name.endsWith(".mdx") ? name : `${name}.mdx`;
|
|
694
|
-
const fullPath =
|
|
695
|
-
import_node_fs4.default.mkdirSync(
|
|
696
|
-
const document =
|
|
769
|
+
const fullPath = import_node_path9.default.join(directory, options.path || "", withExtension);
|
|
770
|
+
import_node_fs4.default.mkdirSync(import_node_path9.default.dirname(fullPath), { recursive: true });
|
|
771
|
+
const document = import_gray_matter5.default.stringify(customDoc.markdown.trim(), rest);
|
|
697
772
|
import_node_fs4.default.writeFileSync(fullPath, document);
|
|
698
773
|
};
|
|
699
774
|
var rmCustomDoc = (directory) => async (filePath) => {
|
|
700
775
|
const withExtension = filePath.endsWith(".mdx") ? filePath : `${filePath}.mdx`;
|
|
701
|
-
await import_promises8.default.rm((0,
|
|
776
|
+
await import_promises8.default.rm((0, import_node_path9.join)(directory, withExtension), { recursive: true });
|
|
702
777
|
};
|
|
703
778
|
|
|
704
779
|
// src/teams.ts
|
|
705
780
|
var import_promises9 = __toESM(require("fs/promises"));
|
|
706
781
|
var import_node_fs5 = __toESM(require("fs"));
|
|
707
|
-
var
|
|
708
|
-
var
|
|
782
|
+
var import_node_path10 = require("path");
|
|
783
|
+
var import_gray_matter6 = __toESM(require("gray-matter"));
|
|
709
784
|
var getTeam = (catalogDir) => async (id) => {
|
|
710
785
|
const files = await getFiles(`${catalogDir}/${id}.{md,mdx}`);
|
|
711
786
|
if (files.length == 0) return void 0;
|
|
712
787
|
const file = files[0];
|
|
713
|
-
const { data, content } =
|
|
788
|
+
const { data, content } = import_gray_matter6.default.read(file);
|
|
714
789
|
return {
|
|
715
790
|
...data,
|
|
716
791
|
id: data.id,
|
|
@@ -722,7 +797,7 @@ var getTeams = (catalogDir) => async (options) => {
|
|
|
722
797
|
const files = await getFiles(`${catalogDir}/teams/*.{md,mdx}`);
|
|
723
798
|
if (files.length === 0) return [];
|
|
724
799
|
return files.map((file) => {
|
|
725
|
-
const { data, content } =
|
|
800
|
+
const { data, content } = import_gray_matter6.default.read(file);
|
|
726
801
|
return {
|
|
727
802
|
...data,
|
|
728
803
|
id: data.id,
|
|
@@ -739,23 +814,23 @@ var writeTeam = (catalogDir) => async (team, options = {}) => {
|
|
|
739
814
|
throw new Error(`Failed to write ${resource.id} (team) as it already exists`);
|
|
740
815
|
}
|
|
741
816
|
const { markdown, ...frontmatter } = resource;
|
|
742
|
-
const document =
|
|
743
|
-
import_node_fs5.default.mkdirSync((0,
|
|
744
|
-
import_node_fs5.default.writeFileSync((0,
|
|
817
|
+
const document = import_gray_matter6.default.stringify(markdown, frontmatter);
|
|
818
|
+
import_node_fs5.default.mkdirSync((0, import_node_path10.join)(catalogDir, ""), { recursive: true });
|
|
819
|
+
import_node_fs5.default.writeFileSync((0, import_node_path10.join)(catalogDir, "", `${resource.id}.mdx`), document);
|
|
745
820
|
};
|
|
746
821
|
var rmTeamById = (catalogDir) => async (id) => {
|
|
747
|
-
await import_promises9.default.rm((0,
|
|
822
|
+
await import_promises9.default.rm((0, import_node_path10.join)(catalogDir, `${id}.mdx`), { recursive: true });
|
|
748
823
|
};
|
|
749
824
|
|
|
750
825
|
// src/users.ts
|
|
751
826
|
var import_node_fs6 = __toESM(require("fs"));
|
|
752
|
-
var
|
|
753
|
-
var
|
|
827
|
+
var import_node_path11 = require("path");
|
|
828
|
+
var import_gray_matter7 = __toESM(require("gray-matter"));
|
|
754
829
|
var getUser = (catalogDir) => async (id) => {
|
|
755
830
|
const files = await getFiles(`${catalogDir}/${id}.{md,mdx}`);
|
|
756
831
|
if (files.length == 0) return void 0;
|
|
757
832
|
const file = files[0];
|
|
758
|
-
const { data, content } =
|
|
833
|
+
const { data, content } = import_gray_matter7.default.read(file);
|
|
759
834
|
return {
|
|
760
835
|
...data,
|
|
761
836
|
id: data.id,
|
|
@@ -768,7 +843,7 @@ var getUsers = (catalogDir) => async (options) => {
|
|
|
768
843
|
const files = await getFiles(`${catalogDir}/users/*.{md,mdx}`);
|
|
769
844
|
if (files.length === 0) return [];
|
|
770
845
|
return files.map((file) => {
|
|
771
|
-
const { data, content } =
|
|
846
|
+
const { data, content } = import_gray_matter7.default.read(file);
|
|
772
847
|
return {
|
|
773
848
|
...data,
|
|
774
849
|
id: data.id,
|
|
@@ -786,21 +861,21 @@ var writeUser = (catalogDir) => async (user, options = {}) => {
|
|
|
786
861
|
throw new Error(`Failed to write ${resource.id} (user) as it already exists`);
|
|
787
862
|
}
|
|
788
863
|
const { markdown, ...frontmatter } = resource;
|
|
789
|
-
const document =
|
|
790
|
-
import_node_fs6.default.mkdirSync((0,
|
|
791
|
-
import_node_fs6.default.writeFileSync((0,
|
|
864
|
+
const document = import_gray_matter7.default.stringify(markdown, frontmatter);
|
|
865
|
+
import_node_fs6.default.mkdirSync((0, import_node_path11.join)(catalogDir, ""), { recursive: true });
|
|
866
|
+
import_node_fs6.default.writeFileSync((0, import_node_path11.join)(catalogDir, "", `${resource.id}.mdx`), document);
|
|
792
867
|
};
|
|
793
868
|
var rmUserById = (catalogDir) => async (id) => {
|
|
794
|
-
import_node_fs6.default.rmSync((0,
|
|
869
|
+
import_node_fs6.default.rmSync((0, import_node_path11.join)(catalogDir, `${id}.mdx`), { recursive: true });
|
|
795
870
|
};
|
|
796
871
|
|
|
797
872
|
// src/eventcatalog.ts
|
|
798
873
|
var import_fs = __toESM(require("fs"));
|
|
799
|
-
var
|
|
874
|
+
var import_node_path12 = __toESM(require("path"));
|
|
800
875
|
var DUMP_VERSION = "0.0.1";
|
|
801
876
|
var getEventCatalogVersion = async (catalogDir) => {
|
|
802
877
|
try {
|
|
803
|
-
const packageJson = import_fs.default.readFileSync((0,
|
|
878
|
+
const packageJson = import_fs.default.readFileSync((0, import_node_path12.join)(catalogDir, "package.json"), "utf8");
|
|
804
879
|
const packageJsonObject = JSON.parse(packageJson);
|
|
805
880
|
return packageJsonObject["dependencies"]["@eventcatalog/core"];
|
|
806
881
|
} catch (error) {
|
|
@@ -813,7 +888,7 @@ var hydrateResource = async (catalogDir, resources = [], { attachSchema = false
|
|
|
813
888
|
const resourcePath = await getResourcePath(catalogDir, resource.id, resource.version);
|
|
814
889
|
let schema = "";
|
|
815
890
|
if (resource.schemaPath && resourcePath?.fullPath) {
|
|
816
|
-
const pathToSchema =
|
|
891
|
+
const pathToSchema = import_node_path12.default.join(import_node_path12.default.dirname(resourcePath?.fullPath), resource.schemaPath);
|
|
817
892
|
if (import_fs.default.existsSync(pathToSchema)) {
|
|
818
893
|
schema = import_fs.default.readFileSync(pathToSchema, "utf8");
|
|
819
894
|
}
|
|
@@ -834,7 +909,7 @@ var filterCollection = (collection, options) => {
|
|
|
834
909
|
};
|
|
835
910
|
var getEventCatalogConfigurationFile = (directory) => async () => {
|
|
836
911
|
try {
|
|
837
|
-
const path4 = (0,
|
|
912
|
+
const path4 = (0, import_node_path12.join)(directory, "eventcatalog.config.js");
|
|
838
913
|
const configModule = await import(path4);
|
|
839
914
|
return configModule.default;
|
|
840
915
|
} catch (error) {
|
|
@@ -900,13 +975,13 @@ var index_default = (path4) => {
|
|
|
900
975
|
* @param version - Optional id of the version to get (supports semver)
|
|
901
976
|
* @returns Event|Undefined
|
|
902
977
|
*/
|
|
903
|
-
getEvent: getEvent((0,
|
|
978
|
+
getEvent: getEvent((0, import_node_path13.join)(path4)),
|
|
904
979
|
/**
|
|
905
980
|
* Returns all events from EventCatalog
|
|
906
981
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
907
982
|
* @returns Event[]|Undefined
|
|
908
983
|
*/
|
|
909
|
-
getEvents: getEvents((0,
|
|
984
|
+
getEvents: getEvents((0, import_node_path13.join)(path4)),
|
|
910
985
|
/**
|
|
911
986
|
* Adds an event to EventCatalog
|
|
912
987
|
*
|
|
@@ -914,7 +989,7 @@ var index_default = (path4) => {
|
|
|
914
989
|
* @param options - Optional options to write the event
|
|
915
990
|
*
|
|
916
991
|
*/
|
|
917
|
-
writeEvent: writeEvent((0,
|
|
992
|
+
writeEvent: writeEvent((0, import_node_path13.join)(path4, "events")),
|
|
918
993
|
/**
|
|
919
994
|
* Adds an event to a service in EventCatalog
|
|
920
995
|
*
|
|
@@ -923,26 +998,26 @@ var index_default = (path4) => {
|
|
|
923
998
|
* @param options - Optional options to write the event
|
|
924
999
|
*
|
|
925
1000
|
*/
|
|
926
|
-
writeEventToService: writeEventToService((0,
|
|
1001
|
+
writeEventToService: writeEventToService((0, import_node_path13.join)(path4)),
|
|
927
1002
|
/**
|
|
928
1003
|
* Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
|
|
929
1004
|
*
|
|
930
1005
|
* @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
|
|
931
1006
|
*
|
|
932
1007
|
*/
|
|
933
|
-
rmEvent: rmEvent((0,
|
|
1008
|
+
rmEvent: rmEvent((0, import_node_path13.join)(path4, "events")),
|
|
934
1009
|
/**
|
|
935
1010
|
* Remove an event by an Event id
|
|
936
1011
|
*
|
|
937
1012
|
* @param id - The id of the event you want to remove
|
|
938
1013
|
*
|
|
939
1014
|
*/
|
|
940
|
-
rmEventById: rmEventById((0,
|
|
1015
|
+
rmEventById: rmEventById((0, import_node_path13.join)(path4)),
|
|
941
1016
|
/**
|
|
942
1017
|
* Moves a given event id to the version directory
|
|
943
1018
|
* @param directory
|
|
944
1019
|
*/
|
|
945
|
-
versionEvent: versionEvent((0,
|
|
1020
|
+
versionEvent: versionEvent((0, import_node_path13.join)(path4)),
|
|
946
1021
|
/**
|
|
947
1022
|
* Adds a file to the given event
|
|
948
1023
|
* @param id - The id of the event to add the file to
|
|
@@ -950,7 +1025,7 @@ var index_default = (path4) => {
|
|
|
950
1025
|
* @param version - Optional version of the event to add the file to
|
|
951
1026
|
* @returns
|
|
952
1027
|
*/
|
|
953
|
-
addFileToEvent: addFileToEvent((0,
|
|
1028
|
+
addFileToEvent: addFileToEvent((0, import_node_path13.join)(path4)),
|
|
954
1029
|
/**
|
|
955
1030
|
* Adds a schema to the given event
|
|
956
1031
|
* @param id - The id of the event to add the schema to
|
|
@@ -958,14 +1033,14 @@ var index_default = (path4) => {
|
|
|
958
1033
|
* @param version - Optional version of the event to add the schema to
|
|
959
1034
|
* @returns
|
|
960
1035
|
*/
|
|
961
|
-
addSchemaToEvent: addSchemaToEvent((0,
|
|
1036
|
+
addSchemaToEvent: addSchemaToEvent((0, import_node_path13.join)(path4)),
|
|
962
1037
|
/**
|
|
963
1038
|
* Check to see if an event version exists
|
|
964
1039
|
* @param id - The id of the event
|
|
965
1040
|
* @param version - The version of the event (supports semver)
|
|
966
1041
|
* @returns
|
|
967
1042
|
*/
|
|
968
|
-
eventHasVersion: eventHasVersion((0,
|
|
1043
|
+
eventHasVersion: eventHasVersion((0, import_node_path13.join)(path4)),
|
|
969
1044
|
/**
|
|
970
1045
|
* ================================
|
|
971
1046
|
* Commands
|
|
@@ -977,13 +1052,13 @@ var index_default = (path4) => {
|
|
|
977
1052
|
* @param version - Optional id of the version to get (supports semver)
|
|
978
1053
|
* @returns Command|Undefined
|
|
979
1054
|
*/
|
|
980
|
-
getCommand: getCommand((0,
|
|
1055
|
+
getCommand: getCommand((0, import_node_path13.join)(path4)),
|
|
981
1056
|
/**
|
|
982
1057
|
* Returns all commands from EventCatalog
|
|
983
1058
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
984
1059
|
* @returns Command[]|Undefined
|
|
985
1060
|
*/
|
|
986
|
-
getCommands: getCommands((0,
|
|
1061
|
+
getCommands: getCommands((0, import_node_path13.join)(path4)),
|
|
987
1062
|
/**
|
|
988
1063
|
* Adds an command to EventCatalog
|
|
989
1064
|
*
|
|
@@ -991,7 +1066,7 @@ var index_default = (path4) => {
|
|
|
991
1066
|
* @param options - Optional options to write the command
|
|
992
1067
|
*
|
|
993
1068
|
*/
|
|
994
|
-
writeCommand: writeCommand((0,
|
|
1069
|
+
writeCommand: writeCommand((0, import_node_path13.join)(path4, "commands")),
|
|
995
1070
|
/**
|
|
996
1071
|
* Adds a command to a service in EventCatalog
|
|
997
1072
|
*
|
|
@@ -1000,26 +1075,26 @@ var index_default = (path4) => {
|
|
|
1000
1075
|
* @param options - Optional options to write the command
|
|
1001
1076
|
*
|
|
1002
1077
|
*/
|
|
1003
|
-
writeCommandToService: writeCommandToService((0,
|
|
1078
|
+
writeCommandToService: writeCommandToService((0, import_node_path13.join)(path4)),
|
|
1004
1079
|
/**
|
|
1005
1080
|
* Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1006
1081
|
*
|
|
1007
1082
|
* @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
|
|
1008
1083
|
*
|
|
1009
1084
|
*/
|
|
1010
|
-
rmCommand: rmCommand((0,
|
|
1085
|
+
rmCommand: rmCommand((0, import_node_path13.join)(path4, "commands")),
|
|
1011
1086
|
/**
|
|
1012
1087
|
* Remove an command by an Event id
|
|
1013
1088
|
*
|
|
1014
1089
|
* @param id - The id of the command you want to remove
|
|
1015
1090
|
*
|
|
1016
1091
|
*/
|
|
1017
|
-
rmCommandById: rmCommandById((0,
|
|
1092
|
+
rmCommandById: rmCommandById((0, import_node_path13.join)(path4)),
|
|
1018
1093
|
/**
|
|
1019
1094
|
* Moves a given command id to the version directory
|
|
1020
1095
|
* @param directory
|
|
1021
1096
|
*/
|
|
1022
|
-
versionCommand: versionCommand((0,
|
|
1097
|
+
versionCommand: versionCommand((0, import_node_path13.join)(path4)),
|
|
1023
1098
|
/**
|
|
1024
1099
|
* Adds a file to the given command
|
|
1025
1100
|
* @param id - The id of the command to add the file to
|
|
@@ -1027,7 +1102,7 @@ var index_default = (path4) => {
|
|
|
1027
1102
|
* @param version - Optional version of the command to add the file to
|
|
1028
1103
|
* @returns
|
|
1029
1104
|
*/
|
|
1030
|
-
addFileToCommand: addFileToCommand((0,
|
|
1105
|
+
addFileToCommand: addFileToCommand((0, import_node_path13.join)(path4)),
|
|
1031
1106
|
/**
|
|
1032
1107
|
* Adds a schema to the given command
|
|
1033
1108
|
* @param id - The id of the command to add the schema to
|
|
@@ -1035,14 +1110,14 @@ var index_default = (path4) => {
|
|
|
1035
1110
|
* @param version - Optional version of the command to add the schema to
|
|
1036
1111
|
* @returns
|
|
1037
1112
|
*/
|
|
1038
|
-
addSchemaToCommand: addSchemaToCommand((0,
|
|
1113
|
+
addSchemaToCommand: addSchemaToCommand((0, import_node_path13.join)(path4)),
|
|
1039
1114
|
/**
|
|
1040
1115
|
* Check to see if a command version exists
|
|
1041
1116
|
* @param id - The id of the command
|
|
1042
1117
|
* @param version - The version of the command (supports semver)
|
|
1043
1118
|
* @returns
|
|
1044
1119
|
*/
|
|
1045
|
-
commandHasVersion: commandHasVersion((0,
|
|
1120
|
+
commandHasVersion: commandHasVersion((0, import_node_path13.join)(path4)),
|
|
1046
1121
|
/**
|
|
1047
1122
|
* ================================
|
|
1048
1123
|
* Queries
|
|
@@ -1054,13 +1129,13 @@ var index_default = (path4) => {
|
|
|
1054
1129
|
* @param version - Optional id of the version to get (supports semver)
|
|
1055
1130
|
* @returns Query|Undefined
|
|
1056
1131
|
*/
|
|
1057
|
-
getQuery: getQuery((0,
|
|
1132
|
+
getQuery: getQuery((0, import_node_path13.join)(path4)),
|
|
1058
1133
|
/**
|
|
1059
1134
|
* Returns all queries from EventCatalog
|
|
1060
1135
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1061
1136
|
* @returns Query[]|Undefined
|
|
1062
1137
|
*/
|
|
1063
|
-
getQueries: getQueries((0,
|
|
1138
|
+
getQueries: getQueries((0, import_node_path13.join)(path4)),
|
|
1064
1139
|
/**
|
|
1065
1140
|
* Adds a query to EventCatalog
|
|
1066
1141
|
*
|
|
@@ -1068,7 +1143,7 @@ var index_default = (path4) => {
|
|
|
1068
1143
|
* @param options - Optional options to write the event
|
|
1069
1144
|
*
|
|
1070
1145
|
*/
|
|
1071
|
-
writeQuery: writeQuery((0,
|
|
1146
|
+
writeQuery: writeQuery((0, import_node_path13.join)(path4, "queries")),
|
|
1072
1147
|
/**
|
|
1073
1148
|
* Adds a query to a service in EventCatalog
|
|
1074
1149
|
*
|
|
@@ -1077,26 +1152,26 @@ var index_default = (path4) => {
|
|
|
1077
1152
|
* @param options - Optional options to write the query
|
|
1078
1153
|
*
|
|
1079
1154
|
*/
|
|
1080
|
-
writeQueryToService: writeQueryToService((0,
|
|
1155
|
+
writeQueryToService: writeQueryToService((0, import_node_path13.join)(path4)),
|
|
1081
1156
|
/**
|
|
1082
1157
|
* Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1083
1158
|
*
|
|
1084
1159
|
* @param path - The path to your query, e.g. `/Orders/GetOrder`
|
|
1085
1160
|
*
|
|
1086
1161
|
*/
|
|
1087
|
-
rmQuery: rmQuery((0,
|
|
1162
|
+
rmQuery: rmQuery((0, import_node_path13.join)(path4, "queries")),
|
|
1088
1163
|
/**
|
|
1089
1164
|
* Remove a query by a Query id
|
|
1090
1165
|
*
|
|
1091
1166
|
* @param id - The id of the query you want to remove
|
|
1092
1167
|
*
|
|
1093
1168
|
*/
|
|
1094
|
-
rmQueryById: rmQueryById((0,
|
|
1169
|
+
rmQueryById: rmQueryById((0, import_node_path13.join)(path4)),
|
|
1095
1170
|
/**
|
|
1096
1171
|
* Moves a given query id to the version directory
|
|
1097
1172
|
* @param directory
|
|
1098
1173
|
*/
|
|
1099
|
-
versionQuery: versionQuery((0,
|
|
1174
|
+
versionQuery: versionQuery((0, import_node_path13.join)(path4)),
|
|
1100
1175
|
/**
|
|
1101
1176
|
* Adds a file to the given query
|
|
1102
1177
|
* @param id - The id of the query to add the file to
|
|
@@ -1104,7 +1179,7 @@ var index_default = (path4) => {
|
|
|
1104
1179
|
* @param version - Optional version of the query to add the file to
|
|
1105
1180
|
* @returns
|
|
1106
1181
|
*/
|
|
1107
|
-
addFileToQuery: addFileToQuery((0,
|
|
1182
|
+
addFileToQuery: addFileToQuery((0, import_node_path13.join)(path4)),
|
|
1108
1183
|
/**
|
|
1109
1184
|
* Adds a schema to the given query
|
|
1110
1185
|
* @param id - The id of the query to add the schema to
|
|
@@ -1112,14 +1187,14 @@ var index_default = (path4) => {
|
|
|
1112
1187
|
* @param version - Optional version of the query to add the schema to
|
|
1113
1188
|
* @returns
|
|
1114
1189
|
*/
|
|
1115
|
-
addSchemaToQuery: addSchemaToQuery((0,
|
|
1190
|
+
addSchemaToQuery: addSchemaToQuery((0, import_node_path13.join)(path4)),
|
|
1116
1191
|
/**
|
|
1117
1192
|
* Check to see if an query version exists
|
|
1118
1193
|
* @param id - The id of the query
|
|
1119
1194
|
* @param version - The version of the query (supports semver)
|
|
1120
1195
|
* @returns
|
|
1121
1196
|
*/
|
|
1122
|
-
queryHasVersion: queryHasVersion((0,
|
|
1197
|
+
queryHasVersion: queryHasVersion((0, import_node_path13.join)(path4)),
|
|
1123
1198
|
/**
|
|
1124
1199
|
* ================================
|
|
1125
1200
|
* Channels
|
|
@@ -1131,13 +1206,13 @@ var index_default = (path4) => {
|
|
|
1131
1206
|
* @param version - Optional id of the version to get (supports semver)
|
|
1132
1207
|
* @returns Channel|Undefined
|
|
1133
1208
|
*/
|
|
1134
|
-
getChannel: getChannel((0,
|
|
1209
|
+
getChannel: getChannel((0, import_node_path13.join)(path4)),
|
|
1135
1210
|
/**
|
|
1136
1211
|
* Returns all channels from EventCatalog
|
|
1137
1212
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1138
1213
|
* @returns Channel[]|Undefined
|
|
1139
1214
|
*/
|
|
1140
|
-
getChannels: getChannels((0,
|
|
1215
|
+
getChannels: getChannels((0, import_node_path13.join)(path4)),
|
|
1141
1216
|
/**
|
|
1142
1217
|
* Adds an channel to EventCatalog
|
|
1143
1218
|
*
|
|
@@ -1145,33 +1220,33 @@ var index_default = (path4) => {
|
|
|
1145
1220
|
* @param options - Optional options to write the channel
|
|
1146
1221
|
*
|
|
1147
1222
|
*/
|
|
1148
|
-
writeChannel: writeChannel((0,
|
|
1223
|
+
writeChannel: writeChannel((0, import_node_path13.join)(path4, "channels")),
|
|
1149
1224
|
/**
|
|
1150
1225
|
* Remove an channel to EventCatalog (modeled on the standard POSIX rm utility)
|
|
1151
1226
|
*
|
|
1152
1227
|
* @param path - The path to your channel, e.g. `/Inventory/InventoryAdjusted`
|
|
1153
1228
|
*
|
|
1154
1229
|
*/
|
|
1155
|
-
rmChannel: rmChannel((0,
|
|
1230
|
+
rmChannel: rmChannel((0, import_node_path13.join)(path4, "channels")),
|
|
1156
1231
|
/**
|
|
1157
1232
|
* Remove an channel by an Event id
|
|
1158
1233
|
*
|
|
1159
1234
|
* @param id - The id of the channel you want to remove
|
|
1160
1235
|
*
|
|
1161
1236
|
*/
|
|
1162
|
-
rmChannelById: rmChannelById((0,
|
|
1237
|
+
rmChannelById: rmChannelById((0, import_node_path13.join)(path4)),
|
|
1163
1238
|
/**
|
|
1164
1239
|
* Moves a given channel id to the version directory
|
|
1165
1240
|
* @param directory
|
|
1166
1241
|
*/
|
|
1167
|
-
versionChannel: versionChannel((0,
|
|
1242
|
+
versionChannel: versionChannel((0, import_node_path13.join)(path4)),
|
|
1168
1243
|
/**
|
|
1169
1244
|
* Check to see if a channel version exists
|
|
1170
1245
|
* @param id - The id of the channel
|
|
1171
1246
|
* @param version - The version of the channel (supports semver)
|
|
1172
1247
|
* @returns
|
|
1173
1248
|
*/
|
|
1174
|
-
channelHasVersion: channelHasVersion((0,
|
|
1249
|
+
channelHasVersion: channelHasVersion((0, import_node_path13.join)(path4)),
|
|
1175
1250
|
/**
|
|
1176
1251
|
* Add a channel to an event
|
|
1177
1252
|
*
|
|
@@ -1188,7 +1263,7 @@ var index_default = (path4) => {
|
|
|
1188
1263
|
*
|
|
1189
1264
|
* ```
|
|
1190
1265
|
*/
|
|
1191
|
-
addEventToChannel: addMessageToChannel((0,
|
|
1266
|
+
addEventToChannel: addMessageToChannel((0, import_node_path13.join)(path4), "events"),
|
|
1192
1267
|
/**
|
|
1193
1268
|
* Add a channel to an command
|
|
1194
1269
|
*
|
|
@@ -1205,7 +1280,7 @@ var index_default = (path4) => {
|
|
|
1205
1280
|
*
|
|
1206
1281
|
* ```
|
|
1207
1282
|
*/
|
|
1208
|
-
addCommandToChannel: addMessageToChannel((0,
|
|
1283
|
+
addCommandToChannel: addMessageToChannel((0, import_node_path13.join)(path4), "commands"),
|
|
1209
1284
|
/**
|
|
1210
1285
|
* Add a channel to an query
|
|
1211
1286
|
*
|
|
@@ -1222,7 +1297,7 @@ var index_default = (path4) => {
|
|
|
1222
1297
|
*
|
|
1223
1298
|
* ```
|
|
1224
1299
|
*/
|
|
1225
|
-
addQueryToChannel: addMessageToChannel((0,
|
|
1300
|
+
addQueryToChannel: addMessageToChannel((0, import_node_path13.join)(path4), "queries"),
|
|
1226
1301
|
/**
|
|
1227
1302
|
* ================================
|
|
1228
1303
|
* SERVICES
|
|
@@ -1235,14 +1310,14 @@ var index_default = (path4) => {
|
|
|
1235
1310
|
* @param options - Optional options to write the event
|
|
1236
1311
|
*
|
|
1237
1312
|
*/
|
|
1238
|
-
writeService: writeService((0,
|
|
1313
|
+
writeService: writeService((0, import_node_path13.join)(path4, "services")),
|
|
1239
1314
|
/**
|
|
1240
1315
|
* Adds a versioned service to EventCatalog
|
|
1241
1316
|
*
|
|
1242
1317
|
* @param service - The service to write
|
|
1243
1318
|
*
|
|
1244
1319
|
*/
|
|
1245
|
-
writeVersionedService: writeVersionedService((0,
|
|
1320
|
+
writeVersionedService: writeVersionedService((0, import_node_path13.join)(path4, "services")),
|
|
1246
1321
|
/**
|
|
1247
1322
|
* Adds a service to a domain in EventCatalog
|
|
1248
1323
|
*
|
|
@@ -1251,39 +1326,39 @@ var index_default = (path4) => {
|
|
|
1251
1326
|
* @param options - Optional options to write the event
|
|
1252
1327
|
*
|
|
1253
1328
|
*/
|
|
1254
|
-
writeServiceToDomain: writeServiceToDomain((0,
|
|
1329
|
+
writeServiceToDomain: writeServiceToDomain((0, import_node_path13.join)(path4, "domains")),
|
|
1255
1330
|
/**
|
|
1256
1331
|
* Returns a service from EventCatalog
|
|
1257
1332
|
* @param id - The id of the service to retrieve
|
|
1258
1333
|
* @param version - Optional id of the version to get (supports semver)
|
|
1259
1334
|
* @returns Service|Undefined
|
|
1260
1335
|
*/
|
|
1261
|
-
getService: getService((0,
|
|
1336
|
+
getService: getService((0, import_node_path13.join)(path4)),
|
|
1262
1337
|
/**
|
|
1263
1338
|
* Returns all services from EventCatalog
|
|
1264
1339
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1265
1340
|
* @returns Service[]|Undefined
|
|
1266
1341
|
*/
|
|
1267
|
-
getServices: getServices((0,
|
|
1342
|
+
getServices: getServices((0, import_node_path13.join)(path4)),
|
|
1268
1343
|
/**
|
|
1269
1344
|
* Moves a given service id to the version directory
|
|
1270
1345
|
* @param directory
|
|
1271
1346
|
*/
|
|
1272
|
-
versionService: versionService((0,
|
|
1347
|
+
versionService: versionService((0, import_node_path13.join)(path4)),
|
|
1273
1348
|
/**
|
|
1274
1349
|
* Remove a service from EventCatalog (modeled on the standard POSIX rm utility)
|
|
1275
1350
|
*
|
|
1276
1351
|
* @param path - The path to your service, e.g. `/InventoryService`
|
|
1277
1352
|
*
|
|
1278
1353
|
*/
|
|
1279
|
-
rmService: rmService((0,
|
|
1354
|
+
rmService: rmService((0, import_node_path13.join)(path4, "services")),
|
|
1280
1355
|
/**
|
|
1281
1356
|
* Remove an service by an service id
|
|
1282
1357
|
*
|
|
1283
1358
|
* @param id - The id of the service you want to remove
|
|
1284
1359
|
*
|
|
1285
1360
|
*/
|
|
1286
|
-
rmServiceById: rmServiceById((0,
|
|
1361
|
+
rmServiceById: rmServiceById((0, import_node_path13.join)(path4)),
|
|
1287
1362
|
/**
|
|
1288
1363
|
* Adds a file to the given service
|
|
1289
1364
|
* @param id - The id of the service to add the file to
|
|
@@ -1291,21 +1366,21 @@ var index_default = (path4) => {
|
|
|
1291
1366
|
* @param version - Optional version of the service to add the file to
|
|
1292
1367
|
* @returns
|
|
1293
1368
|
*/
|
|
1294
|
-
addFileToService: addFileToService((0,
|
|
1369
|
+
addFileToService: addFileToService((0, import_node_path13.join)(path4)),
|
|
1295
1370
|
/**
|
|
1296
1371
|
* Returns the specifications for a given service
|
|
1297
1372
|
* @param id - The id of the service to retrieve the specifications for
|
|
1298
1373
|
* @param version - Optional version of the service
|
|
1299
1374
|
* @returns
|
|
1300
1375
|
*/
|
|
1301
|
-
getSpecificationFilesForService: getSpecificationFilesForService((0,
|
|
1376
|
+
getSpecificationFilesForService: getSpecificationFilesForService((0, import_node_path13.join)(path4)),
|
|
1302
1377
|
/**
|
|
1303
1378
|
* Check to see if a service version exists
|
|
1304
1379
|
* @param id - The id of the service
|
|
1305
1380
|
* @param version - The version of the service (supports semver)
|
|
1306
1381
|
* @returns
|
|
1307
1382
|
*/
|
|
1308
|
-
serviceHasVersion: serviceHasVersion((0,
|
|
1383
|
+
serviceHasVersion: serviceHasVersion((0, import_node_path13.join)(path4)),
|
|
1309
1384
|
/**
|
|
1310
1385
|
* Add an event to a service by it's id.
|
|
1311
1386
|
*
|
|
@@ -1325,7 +1400,7 @@ var index_default = (path4) => {
|
|
|
1325
1400
|
*
|
|
1326
1401
|
* ```
|
|
1327
1402
|
*/
|
|
1328
|
-
addEventToService: addMessageToService((0,
|
|
1403
|
+
addEventToService: addMessageToService((0, import_node_path13.join)(path4)),
|
|
1329
1404
|
/**
|
|
1330
1405
|
* Add a command to a service by it's id.
|
|
1331
1406
|
*
|
|
@@ -1345,7 +1420,7 @@ var index_default = (path4) => {
|
|
|
1345
1420
|
*
|
|
1346
1421
|
* ```
|
|
1347
1422
|
*/
|
|
1348
|
-
addCommandToService: addMessageToService((0,
|
|
1423
|
+
addCommandToService: addMessageToService((0, import_node_path13.join)(path4)),
|
|
1349
1424
|
/**
|
|
1350
1425
|
* Add a query to a service by it's id.
|
|
1351
1426
|
*
|
|
@@ -1365,7 +1440,7 @@ var index_default = (path4) => {
|
|
|
1365
1440
|
*
|
|
1366
1441
|
* ```
|
|
1367
1442
|
*/
|
|
1368
|
-
addQueryToService: addMessageToService((0,
|
|
1443
|
+
addQueryToService: addMessageToService((0, import_node_path13.join)(path4)),
|
|
1369
1444
|
/**
|
|
1370
1445
|
* ================================
|
|
1371
1446
|
* Domains
|
|
@@ -1378,39 +1453,39 @@ var index_default = (path4) => {
|
|
|
1378
1453
|
* @param options - Optional options to write the event
|
|
1379
1454
|
*
|
|
1380
1455
|
*/
|
|
1381
|
-
writeDomain: writeDomain((0,
|
|
1456
|
+
writeDomain: writeDomain((0, import_node_path13.join)(path4, "domains")),
|
|
1382
1457
|
/**
|
|
1383
1458
|
* Returns a domain from EventCatalog
|
|
1384
1459
|
* @param id - The id of the domain to retrieve
|
|
1385
1460
|
* @param version - Optional id of the version to get (supports semver)
|
|
1386
1461
|
* @returns Domain|Undefined
|
|
1387
1462
|
*/
|
|
1388
|
-
getDomain: getDomain((0,
|
|
1463
|
+
getDomain: getDomain((0, import_node_path13.join)(path4, "domains")),
|
|
1389
1464
|
/**
|
|
1390
1465
|
* Returns all domains from EventCatalog
|
|
1391
1466
|
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1392
1467
|
* @returns Domain[]|Undefined
|
|
1393
1468
|
*/
|
|
1394
|
-
getDomains: getDomains((0,
|
|
1469
|
+
getDomains: getDomains((0, import_node_path13.join)(path4)),
|
|
1395
1470
|
/**
|
|
1396
1471
|
* Moves a given domain id to the version directory
|
|
1397
1472
|
* @param directory
|
|
1398
1473
|
*/
|
|
1399
|
-
versionDomain: versionDomain((0,
|
|
1474
|
+
versionDomain: versionDomain((0, import_node_path13.join)(path4, "domains")),
|
|
1400
1475
|
/**
|
|
1401
1476
|
* Remove a domain from EventCatalog (modeled on the standard POSIX rm utility)
|
|
1402
1477
|
*
|
|
1403
1478
|
* @param path - The path to your domain, e.g. `/Payment`
|
|
1404
1479
|
*
|
|
1405
1480
|
*/
|
|
1406
|
-
rmDomain: rmDomain((0,
|
|
1481
|
+
rmDomain: rmDomain((0, import_node_path13.join)(path4, "domains")),
|
|
1407
1482
|
/**
|
|
1408
1483
|
* Remove an service by an domain id
|
|
1409
1484
|
*
|
|
1410
1485
|
* @param id - The id of the domain you want to remove
|
|
1411
1486
|
*
|
|
1412
1487
|
*/
|
|
1413
|
-
rmDomainById: rmDomainById((0,
|
|
1488
|
+
rmDomainById: rmDomainById((0, import_node_path13.join)(path4, "domains")),
|
|
1414
1489
|
/**
|
|
1415
1490
|
* Adds a file to the given domain
|
|
1416
1491
|
* @param id - The id of the domain to add the file to
|
|
@@ -1418,28 +1493,28 @@ var index_default = (path4) => {
|
|
|
1418
1493
|
* @param version - Optional version of the domain to add the file to
|
|
1419
1494
|
* @returns
|
|
1420
1495
|
*/
|
|
1421
|
-
addFileToDomain: addFileToDomain((0,
|
|
1496
|
+
addFileToDomain: addFileToDomain((0, import_node_path13.join)(path4, "domains")),
|
|
1422
1497
|
/**
|
|
1423
1498
|
* Adds an ubiquitous language dictionary to a domain
|
|
1424
1499
|
* @param id - The id of the domain to add the ubiquitous language to
|
|
1425
1500
|
* @param ubiquitousLanguageDictionary - The ubiquitous language dictionary to add
|
|
1426
1501
|
* @param version - Optional version of the domain to add the ubiquitous language to
|
|
1427
1502
|
*/
|
|
1428
|
-
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain((0,
|
|
1503
|
+
addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain((0, import_node_path13.join)(path4, "domains")),
|
|
1429
1504
|
/**
|
|
1430
1505
|
* Get the ubiquitous language dictionary from a domain
|
|
1431
1506
|
* @param id - The id of the domain to get the ubiquitous language from
|
|
1432
1507
|
* @param version - Optional version of the domain to get the ubiquitous language from
|
|
1433
1508
|
* @returns
|
|
1434
1509
|
*/
|
|
1435
|
-
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain((0,
|
|
1510
|
+
getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain((0, import_node_path13.join)(path4, "domains")),
|
|
1436
1511
|
/**
|
|
1437
1512
|
* Check to see if a domain version exists
|
|
1438
1513
|
* @param id - The id of the domain
|
|
1439
1514
|
* @param version - The version of the domain (supports semver)
|
|
1440
1515
|
* @returns
|
|
1441
1516
|
*/
|
|
1442
|
-
domainHasVersion: domainHasVersion((0,
|
|
1517
|
+
domainHasVersion: domainHasVersion((0, import_node_path13.join)(path4)),
|
|
1443
1518
|
/**
|
|
1444
1519
|
* Adds a given service to a domain
|
|
1445
1520
|
* @param id - The id of the domain
|
|
@@ -1447,7 +1522,7 @@ var index_default = (path4) => {
|
|
|
1447
1522
|
* @param version - (Optional) The version of the domain to add the service to
|
|
1448
1523
|
* @returns
|
|
1449
1524
|
*/
|
|
1450
|
-
addServiceToDomain: addServiceToDomain((0,
|
|
1525
|
+
addServiceToDomain: addServiceToDomain((0, import_node_path13.join)(path4, "domains")),
|
|
1451
1526
|
/**
|
|
1452
1527
|
* Adds a given subdomain to a domain
|
|
1453
1528
|
* @param id - The id of the domain
|
|
@@ -1455,7 +1530,7 @@ var index_default = (path4) => {
|
|
|
1455
1530
|
* @param version - (Optional) The version of the domain to add the subdomain to
|
|
1456
1531
|
* @returns
|
|
1457
1532
|
*/
|
|
1458
|
-
addSubDomainToDomain: addSubDomainToDomain((0,
|
|
1533
|
+
addSubDomainToDomain: addSubDomainToDomain((0, import_node_path13.join)(path4, "domains")),
|
|
1459
1534
|
/**
|
|
1460
1535
|
* ================================
|
|
1461
1536
|
* Teams
|
|
@@ -1468,25 +1543,25 @@ var index_default = (path4) => {
|
|
|
1468
1543
|
* @param options - Optional options to write the team
|
|
1469
1544
|
*
|
|
1470
1545
|
*/
|
|
1471
|
-
writeTeam: writeTeam((0,
|
|
1546
|
+
writeTeam: writeTeam((0, import_node_path13.join)(path4, "teams")),
|
|
1472
1547
|
/**
|
|
1473
1548
|
* Returns a team from EventCatalog
|
|
1474
1549
|
* @param id - The id of the team to retrieve
|
|
1475
1550
|
* @returns Team|Undefined
|
|
1476
1551
|
*/
|
|
1477
|
-
getTeam: getTeam((0,
|
|
1552
|
+
getTeam: getTeam((0, import_node_path13.join)(path4, "teams")),
|
|
1478
1553
|
/**
|
|
1479
1554
|
* Returns all teams from EventCatalog
|
|
1480
1555
|
* @returns Team[]|Undefined
|
|
1481
1556
|
*/
|
|
1482
|
-
getTeams: getTeams((0,
|
|
1557
|
+
getTeams: getTeams((0, import_node_path13.join)(path4)),
|
|
1483
1558
|
/**
|
|
1484
1559
|
* Remove a team by the team id
|
|
1485
1560
|
*
|
|
1486
1561
|
* @param id - The id of the team you want to remove
|
|
1487
1562
|
*
|
|
1488
1563
|
*/
|
|
1489
|
-
rmTeamById: rmTeamById((0,
|
|
1564
|
+
rmTeamById: rmTeamById((0, import_node_path13.join)(path4, "teams")),
|
|
1490
1565
|
/**
|
|
1491
1566
|
* ================================
|
|
1492
1567
|
* Users
|
|
@@ -1499,25 +1574,25 @@ var index_default = (path4) => {
|
|
|
1499
1574
|
* @param options - Optional options to write the user
|
|
1500
1575
|
*
|
|
1501
1576
|
*/
|
|
1502
|
-
writeUser: writeUser((0,
|
|
1577
|
+
writeUser: writeUser((0, import_node_path13.join)(path4, "users")),
|
|
1503
1578
|
/**
|
|
1504
1579
|
* Returns a user from EventCatalog
|
|
1505
1580
|
* @param id - The id of the user to retrieve
|
|
1506
1581
|
* @returns User|Undefined
|
|
1507
1582
|
*/
|
|
1508
|
-
getUser: getUser((0,
|
|
1583
|
+
getUser: getUser((0, import_node_path13.join)(path4, "users")),
|
|
1509
1584
|
/**
|
|
1510
1585
|
* Returns all user from EventCatalog
|
|
1511
1586
|
* @returns User[]|Undefined
|
|
1512
1587
|
*/
|
|
1513
|
-
getUsers: getUsers((0,
|
|
1588
|
+
getUsers: getUsers((0, import_node_path13.join)(path4)),
|
|
1514
1589
|
/**
|
|
1515
1590
|
* Remove a user by the user id
|
|
1516
1591
|
*
|
|
1517
1592
|
* @param id - The id of the user you want to remove
|
|
1518
1593
|
*
|
|
1519
1594
|
*/
|
|
1520
|
-
rmUserById: rmUserById((0,
|
|
1595
|
+
rmUserById: rmUserById((0, import_node_path13.join)(path4, "users")),
|
|
1521
1596
|
/**
|
|
1522
1597
|
* ================================
|
|
1523
1598
|
* Custom Docs
|
|
@@ -1528,32 +1603,32 @@ var index_default = (path4) => {
|
|
|
1528
1603
|
* @param path - The path to the custom doc to retrieve
|
|
1529
1604
|
* @returns CustomDoc|Undefined
|
|
1530
1605
|
*/
|
|
1531
|
-
getCustomDoc: getCustomDoc((0,
|
|
1606
|
+
getCustomDoc: getCustomDoc((0, import_node_path13.join)(path4, "docs")),
|
|
1532
1607
|
/**
|
|
1533
1608
|
* Returns all custom docs from EventCatalog
|
|
1534
1609
|
* @param options - Optional options to get custom docs from a specific path
|
|
1535
1610
|
* @returns CustomDoc[]|Undefined
|
|
1536
1611
|
*/
|
|
1537
|
-
getCustomDocs: getCustomDocs((0,
|
|
1612
|
+
getCustomDocs: getCustomDocs((0, import_node_path13.join)(path4, "docs")),
|
|
1538
1613
|
/**
|
|
1539
1614
|
* Writes a custom doc to EventCatalog
|
|
1540
1615
|
* @param customDoc - The custom doc to write
|
|
1541
1616
|
* @param options - Optional options to write the custom doc
|
|
1542
1617
|
*
|
|
1543
1618
|
*/
|
|
1544
|
-
writeCustomDoc: writeCustomDoc((0,
|
|
1619
|
+
writeCustomDoc: writeCustomDoc((0, import_node_path13.join)(path4, "docs")),
|
|
1545
1620
|
/**
|
|
1546
1621
|
* Removes a custom doc from EventCatalog
|
|
1547
1622
|
* @param path - The path to the custom doc to remove
|
|
1548
1623
|
*
|
|
1549
1624
|
*/
|
|
1550
|
-
rmCustomDoc: rmCustomDoc((0,
|
|
1625
|
+
rmCustomDoc: rmCustomDoc((0, import_node_path13.join)(path4, "docs")),
|
|
1551
1626
|
/**
|
|
1552
1627
|
* Dumps the catalog to a JSON file.
|
|
1553
1628
|
* @param directory - The directory to dump the catalog to
|
|
1554
1629
|
* @returns A JSON file with the catalog
|
|
1555
1630
|
*/
|
|
1556
|
-
dumpCatalog: dumpCatalog((0,
|
|
1631
|
+
dumpCatalog: dumpCatalog((0, import_node_path13.join)(path4)),
|
|
1557
1632
|
/**
|
|
1558
1633
|
* Returns the event catalog configuration file.
|
|
1559
1634
|
* The event catalog configuration file is the file that contains the configuration for the event catalog.
|
|
@@ -1561,7 +1636,7 @@ var index_default = (path4) => {
|
|
|
1561
1636
|
* @param directory - The directory of the catalog.
|
|
1562
1637
|
* @returns A JSON object with the configuration for the event catalog.
|
|
1563
1638
|
*/
|
|
1564
|
-
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile((0,
|
|
1639
|
+
getEventCatalogConfigurationFile: getEventCatalogConfigurationFile((0, import_node_path13.join)(path4)),
|
|
1565
1640
|
/**
|
|
1566
1641
|
* ================================
|
|
1567
1642
|
* Resources Utils
|
|
@@ -1570,7 +1645,26 @@ var index_default = (path4) => {
|
|
|
1570
1645
|
/**
|
|
1571
1646
|
* Returns the path to a given resource by id and version
|
|
1572
1647
|
*/
|
|
1573
|
-
getResourcePath
|
|
1648
|
+
getResourcePath,
|
|
1649
|
+
/**
|
|
1650
|
+
* ================================
|
|
1651
|
+
* General Message Utils
|
|
1652
|
+
* ================================
|
|
1653
|
+
*/
|
|
1654
|
+
/**
|
|
1655
|
+
* Returns a message from EventCatalog by a given schema path.
|
|
1656
|
+
*
|
|
1657
|
+
* @param path - The path to the message to retrieve
|
|
1658
|
+
* @returns Message|Undefined
|
|
1659
|
+
*/
|
|
1660
|
+
getMessageBySchemaPath: getMessageBySchemaPath((0, import_node_path13.join)(path4)),
|
|
1661
|
+
/**
|
|
1662
|
+
* Returns the producers and consumers (services) for a given message
|
|
1663
|
+
* @param id - The id of the message to get the producers and consumers for
|
|
1664
|
+
* @param version - Optional version of the message
|
|
1665
|
+
* @returns { producers: Service[], consumers: Service[] }
|
|
1666
|
+
*/
|
|
1667
|
+
getProducersAndConsumersForMessage: getProducersAndConsumersForMessage((0, import_node_path13.join)(path4))
|
|
1574
1668
|
};
|
|
1575
1669
|
};
|
|
1576
1670
|
//# sourceMappingURL=index.js.map
|