@eventcatalog/sdk 2.8.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/containers.d.mts +179 -0
- package/dist/containers.d.ts +179 -0
- package/dist/containers.js +374 -0
- package/dist/containers.js.map +1 -0
- package/dist/containers.mjs +331 -0
- package/dist/containers.mjs.map +1 -0
- package/dist/eventcatalog.js +196 -102
- package/dist/eventcatalog.js.map +1 -1
- package/dist/eventcatalog.mjs +198 -104
- package/dist/eventcatalog.mjs.map +1 -1
- package/dist/index.d.mts +97 -30
- package/dist/index.d.ts +97 -30
- package/dist/index.js +192 -98
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +192 -98
- package/dist/index.mjs.map +1 -1
- package/dist/types.d.d.mts +24 -1
- package/dist/types.d.d.ts +24 -1
- package/dist/types.d.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Event, Command, Query, Channel, Service, Domain, UbiquitousLanguageDictionary, Team, User, CustomDoc, EventCatalog, Message, Entity } from './types.d.mjs';
|
|
1
|
+
import { Event, Command, Query, Channel, Service, Domain, UbiquitousLanguageDictionary, Team, User, CustomDoc, EventCatalog, Message, Entity, Container } from './types.d.mjs';
|
|
2
2
|
export { Badge, BaseSchema, ChannelPointer, ResourceGroup, ResourcePointer, Specification, Specifications, UbiquitousLanguage } from './types.d.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -151,7 +151,19 @@ declare const _default: (path: string) => {
|
|
|
151
151
|
id: string;
|
|
152
152
|
version?: string;
|
|
153
153
|
}, options?: {
|
|
154
|
-
path
|
|
154
|
+
path
|
|
155
|
+
/**
|
|
156
|
+
* Check to see if an event version exists
|
|
157
|
+
* @param id - The id of the event
|
|
158
|
+
* @param version - The version of the event (supports semver)
|
|
159
|
+
* @returns
|
|
160
|
+
*/
|
|
161
|
+
? /**
|
|
162
|
+
* Check to see if an event version exists
|
|
163
|
+
* @param id - The id of the event
|
|
164
|
+
* @param version - The version of the event (supports semver)
|
|
165
|
+
* @returns
|
|
166
|
+
*/: string;
|
|
155
167
|
format?: "md" | "mdx";
|
|
156
168
|
override?: boolean;
|
|
157
169
|
}) => Promise<void>;
|
|
@@ -252,19 +264,7 @@ declare const _default: (path: string) => {
|
|
|
252
264
|
version?: string;
|
|
253
265
|
}, options?: {
|
|
254
266
|
path?: string;
|
|
255
|
-
format
|
|
256
|
-
/**
|
|
257
|
-
* Check to see if an event version exists
|
|
258
|
-
* @param id - The id of the event
|
|
259
|
-
* @param version - The version of the event (supports semver)
|
|
260
|
-
* @returns
|
|
261
|
-
*/
|
|
262
|
-
? /**
|
|
263
|
-
* Check to see if an event version exists
|
|
264
|
-
* @param id - The id of the event
|
|
265
|
-
* @param version - The version of the event (supports semver)
|
|
266
|
-
* @returns
|
|
267
|
-
*/: "md" | "mdx";
|
|
267
|
+
format?: "md" | "mdx";
|
|
268
268
|
override?: boolean;
|
|
269
269
|
}) => Promise<void>;
|
|
270
270
|
/**
|
|
@@ -456,13 +456,7 @@ declare const _default: (path: string) => {
|
|
|
456
456
|
*
|
|
457
457
|
*/
|
|
458
458
|
writeService: (service: Service, options?: {
|
|
459
|
-
path
|
|
460
|
-
* Adds a schema to the given event
|
|
461
|
-
* @param id - The id of the event to add the schema to
|
|
462
|
-
* @param schema - Schema contents to add including the content and the file name
|
|
463
|
-
* @param version - Optional version of the event to add the schema to
|
|
464
|
-
* @returns
|
|
465
|
-
*/: string;
|
|
459
|
+
path?: string;
|
|
466
460
|
override?: boolean;
|
|
467
461
|
versionExistingContent?: boolean;
|
|
468
462
|
format?: "md" | "mdx";
|
|
@@ -834,13 +828,7 @@ declare const _default: (path: string) => {
|
|
|
834
828
|
*
|
|
835
829
|
*/
|
|
836
830
|
writeUser: (user: User, options?: {
|
|
837
|
-
override
|
|
838
|
-
* Adds an event to EventCatalog
|
|
839
|
-
*
|
|
840
|
-
* @param event - The event to write
|
|
841
|
-
* @param options - Optional options to write the event
|
|
842
|
-
*
|
|
843
|
-
*/: boolean;
|
|
831
|
+
override?: boolean;
|
|
844
832
|
}) => Promise<void>;
|
|
845
833
|
/**
|
|
846
834
|
* Returns a user from EventCatalog
|
|
@@ -1027,6 +1015,85 @@ declare const _default: (path: string) => {
|
|
|
1027
1015
|
* @returns
|
|
1028
1016
|
*/
|
|
1029
1017
|
entityHasVersion: (id: string, version?: string) => Promise<boolean>;
|
|
1018
|
+
/**
|
|
1019
|
+
* ================================
|
|
1020
|
+
* Data Stores
|
|
1021
|
+
* ================================
|
|
1022
|
+
*/
|
|
1023
|
+
/**
|
|
1024
|
+
* Adds a data store to EventCatalog
|
|
1025
|
+
* @param dataStore - The data store to write
|
|
1026
|
+
* @param options - Optional options to write the data store
|
|
1027
|
+
*
|
|
1028
|
+
*/
|
|
1029
|
+
writeDataStore: (data: Container, options?: {
|
|
1030
|
+
path?: string;
|
|
1031
|
+
override?: boolean;
|
|
1032
|
+
versionExistingContent?: boolean;
|
|
1033
|
+
format?: "md" | "mdx";
|
|
1034
|
+
}) => Promise<void>;
|
|
1035
|
+
/**
|
|
1036
|
+
* Returns a container from EventCatalog
|
|
1037
|
+
* @param id - The id of the container to retrieve
|
|
1038
|
+
* @param version - Optional id of the version to get (supports semver)
|
|
1039
|
+
* @returns Container|Undefined
|
|
1040
|
+
*/
|
|
1041
|
+
getDataStore: (id: string, version?: string) => Promise<Container>;
|
|
1042
|
+
/**
|
|
1043
|
+
* Returns all data stores from EventCatalog
|
|
1044
|
+
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1045
|
+
* @returns Container[]|Undefined
|
|
1046
|
+
*/
|
|
1047
|
+
getDataStores: (options?: {
|
|
1048
|
+
latestOnly?: boolean;
|
|
1049
|
+
}) => Promise<Container[]>;
|
|
1050
|
+
/**
|
|
1051
|
+
* Version a data store by its id
|
|
1052
|
+
* @param id - The id of the data store to version
|
|
1053
|
+
*/
|
|
1054
|
+
versionDataStore: (id: string) => Promise<void>;
|
|
1055
|
+
/**
|
|
1056
|
+
* Remove a data store by its path
|
|
1057
|
+
* @param path - The path to the data store to remove
|
|
1058
|
+
*/
|
|
1059
|
+
rmDataStore: (path: string) => Promise<void>;
|
|
1060
|
+
/**
|
|
1061
|
+
* Remove a data store by its id
|
|
1062
|
+
* @param id - The id of the data store to remove
|
|
1063
|
+
*/
|
|
1064
|
+
rmDataStoreById: (id: string, version?: string, persistFiles?: boolean) => Promise<void>;
|
|
1065
|
+
/**
|
|
1066
|
+
* Check to see if a data store version exists
|
|
1067
|
+
* @param id - The id of the data store
|
|
1068
|
+
* @param version - The version of the data store (supports semver)
|
|
1069
|
+
* @returns
|
|
1070
|
+
*/
|
|
1071
|
+
dataStoreHasVersion: (id: string, version?: string) => Promise<boolean>;
|
|
1072
|
+
/**
|
|
1073
|
+
* Adds a file to a data store by its id
|
|
1074
|
+
* @param id - The id of the data store to add the file to
|
|
1075
|
+
* @param file - File contents to add including the content and the file name
|
|
1076
|
+
* @param version - Optional version of the data store to add the file to
|
|
1077
|
+
* @returns
|
|
1078
|
+
*/
|
|
1079
|
+
addFileToDataStore: (id: string, file: {
|
|
1080
|
+
content: string;
|
|
1081
|
+
fileName: string;
|
|
1082
|
+
}, version?: string) => Promise<void>;
|
|
1083
|
+
/**
|
|
1084
|
+
* Writes a data store to a service by its id
|
|
1085
|
+
* @param dataStore - The data store to write
|
|
1086
|
+
* @param service - The service to write the data store to
|
|
1087
|
+
* @returns
|
|
1088
|
+
*/
|
|
1089
|
+
writeDataStoreToService: (container: Container, service: {
|
|
1090
|
+
id: string;
|
|
1091
|
+
version?: string;
|
|
1092
|
+
}, options?: {
|
|
1093
|
+
path?: string;
|
|
1094
|
+
format?: "md" | "mdx";
|
|
1095
|
+
override?: boolean;
|
|
1096
|
+
}) => Promise<void>;
|
|
1030
1097
|
};
|
|
1031
1098
|
|
|
1032
|
-
export { Channel, Command, CustomDoc, Domain, Entity, Event, EventCatalog, Message, Query, Service, Team, UbiquitousLanguageDictionary, User, _default as default };
|
|
1099
|
+
export { Channel, Command, Container, CustomDoc, Domain, Entity, Event, EventCatalog, Message, Query, Service, Team, UbiquitousLanguageDictionary, User, _default as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Event, Command, Query, Channel, Service, Domain, UbiquitousLanguageDictionary, Team, User, CustomDoc, EventCatalog, Message, Entity } from './types.d.js';
|
|
1
|
+
import { Event, Command, Query, Channel, Service, Domain, UbiquitousLanguageDictionary, Team, User, CustomDoc, EventCatalog, Message, Entity, Container } from './types.d.js';
|
|
2
2
|
export { Badge, BaseSchema, ChannelPointer, ResourceGroup, ResourcePointer, Specification, Specifications, UbiquitousLanguage } from './types.d.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -151,7 +151,19 @@ declare const _default: (path: string) => {
|
|
|
151
151
|
id: string;
|
|
152
152
|
version?: string;
|
|
153
153
|
}, options?: {
|
|
154
|
-
path
|
|
154
|
+
path
|
|
155
|
+
/**
|
|
156
|
+
* Check to see if an event version exists
|
|
157
|
+
* @param id - The id of the event
|
|
158
|
+
* @param version - The version of the event (supports semver)
|
|
159
|
+
* @returns
|
|
160
|
+
*/
|
|
161
|
+
? /**
|
|
162
|
+
* Check to see if an event version exists
|
|
163
|
+
* @param id - The id of the event
|
|
164
|
+
* @param version - The version of the event (supports semver)
|
|
165
|
+
* @returns
|
|
166
|
+
*/: string;
|
|
155
167
|
format?: "md" | "mdx";
|
|
156
168
|
override?: boolean;
|
|
157
169
|
}) => Promise<void>;
|
|
@@ -252,19 +264,7 @@ declare const _default: (path: string) => {
|
|
|
252
264
|
version?: string;
|
|
253
265
|
}, options?: {
|
|
254
266
|
path?: string;
|
|
255
|
-
format
|
|
256
|
-
/**
|
|
257
|
-
* Check to see if an event version exists
|
|
258
|
-
* @param id - The id of the event
|
|
259
|
-
* @param version - The version of the event (supports semver)
|
|
260
|
-
* @returns
|
|
261
|
-
*/
|
|
262
|
-
? /**
|
|
263
|
-
* Check to see if an event version exists
|
|
264
|
-
* @param id - The id of the event
|
|
265
|
-
* @param version - The version of the event (supports semver)
|
|
266
|
-
* @returns
|
|
267
|
-
*/: "md" | "mdx";
|
|
267
|
+
format?: "md" | "mdx";
|
|
268
268
|
override?: boolean;
|
|
269
269
|
}) => Promise<void>;
|
|
270
270
|
/**
|
|
@@ -456,13 +456,7 @@ declare const _default: (path: string) => {
|
|
|
456
456
|
*
|
|
457
457
|
*/
|
|
458
458
|
writeService: (service: Service, options?: {
|
|
459
|
-
path
|
|
460
|
-
* Adds a schema to the given event
|
|
461
|
-
* @param id - The id of the event to add the schema to
|
|
462
|
-
* @param schema - Schema contents to add including the content and the file name
|
|
463
|
-
* @param version - Optional version of the event to add the schema to
|
|
464
|
-
* @returns
|
|
465
|
-
*/: string;
|
|
459
|
+
path?: string;
|
|
466
460
|
override?: boolean;
|
|
467
461
|
versionExistingContent?: boolean;
|
|
468
462
|
format?: "md" | "mdx";
|
|
@@ -834,13 +828,7 @@ declare const _default: (path: string) => {
|
|
|
834
828
|
*
|
|
835
829
|
*/
|
|
836
830
|
writeUser: (user: User, options?: {
|
|
837
|
-
override
|
|
838
|
-
* Adds an event to EventCatalog
|
|
839
|
-
*
|
|
840
|
-
* @param event - The event to write
|
|
841
|
-
* @param options - Optional options to write the event
|
|
842
|
-
*
|
|
843
|
-
*/: boolean;
|
|
831
|
+
override?: boolean;
|
|
844
832
|
}) => Promise<void>;
|
|
845
833
|
/**
|
|
846
834
|
* Returns a user from EventCatalog
|
|
@@ -1027,6 +1015,85 @@ declare const _default: (path: string) => {
|
|
|
1027
1015
|
* @returns
|
|
1028
1016
|
*/
|
|
1029
1017
|
entityHasVersion: (id: string, version?: string) => Promise<boolean>;
|
|
1018
|
+
/**
|
|
1019
|
+
* ================================
|
|
1020
|
+
* Data Stores
|
|
1021
|
+
* ================================
|
|
1022
|
+
*/
|
|
1023
|
+
/**
|
|
1024
|
+
* Adds a data store to EventCatalog
|
|
1025
|
+
* @param dataStore - The data store to write
|
|
1026
|
+
* @param options - Optional options to write the data store
|
|
1027
|
+
*
|
|
1028
|
+
*/
|
|
1029
|
+
writeDataStore: (data: Container, options?: {
|
|
1030
|
+
path?: string;
|
|
1031
|
+
override?: boolean;
|
|
1032
|
+
versionExistingContent?: boolean;
|
|
1033
|
+
format?: "md" | "mdx";
|
|
1034
|
+
}) => Promise<void>;
|
|
1035
|
+
/**
|
|
1036
|
+
* Returns a container from EventCatalog
|
|
1037
|
+
* @param id - The id of the container to retrieve
|
|
1038
|
+
* @param version - Optional id of the version to get (supports semver)
|
|
1039
|
+
* @returns Container|Undefined
|
|
1040
|
+
*/
|
|
1041
|
+
getDataStore: (id: string, version?: string) => Promise<Container>;
|
|
1042
|
+
/**
|
|
1043
|
+
* Returns all data stores from EventCatalog
|
|
1044
|
+
* @param latestOnly - optional boolean, set to true to get only latest versions
|
|
1045
|
+
* @returns Container[]|Undefined
|
|
1046
|
+
*/
|
|
1047
|
+
getDataStores: (options?: {
|
|
1048
|
+
latestOnly?: boolean;
|
|
1049
|
+
}) => Promise<Container[]>;
|
|
1050
|
+
/**
|
|
1051
|
+
* Version a data store by its id
|
|
1052
|
+
* @param id - The id of the data store to version
|
|
1053
|
+
*/
|
|
1054
|
+
versionDataStore: (id: string) => Promise<void>;
|
|
1055
|
+
/**
|
|
1056
|
+
* Remove a data store by its path
|
|
1057
|
+
* @param path - The path to the data store to remove
|
|
1058
|
+
*/
|
|
1059
|
+
rmDataStore: (path: string) => Promise<void>;
|
|
1060
|
+
/**
|
|
1061
|
+
* Remove a data store by its id
|
|
1062
|
+
* @param id - The id of the data store to remove
|
|
1063
|
+
*/
|
|
1064
|
+
rmDataStoreById: (id: string, version?: string, persistFiles?: boolean) => Promise<void>;
|
|
1065
|
+
/**
|
|
1066
|
+
* Check to see if a data store version exists
|
|
1067
|
+
* @param id - The id of the data store
|
|
1068
|
+
* @param version - The version of the data store (supports semver)
|
|
1069
|
+
* @returns
|
|
1070
|
+
*/
|
|
1071
|
+
dataStoreHasVersion: (id: string, version?: string) => Promise<boolean>;
|
|
1072
|
+
/**
|
|
1073
|
+
* Adds a file to a data store by its id
|
|
1074
|
+
* @param id - The id of the data store to add the file to
|
|
1075
|
+
* @param file - File contents to add including the content and the file name
|
|
1076
|
+
* @param version - Optional version of the data store to add the file to
|
|
1077
|
+
* @returns
|
|
1078
|
+
*/
|
|
1079
|
+
addFileToDataStore: (id: string, file: {
|
|
1080
|
+
content: string;
|
|
1081
|
+
fileName: string;
|
|
1082
|
+
}, version?: string) => Promise<void>;
|
|
1083
|
+
/**
|
|
1084
|
+
* Writes a data store to a service by its id
|
|
1085
|
+
* @param dataStore - The data store to write
|
|
1086
|
+
* @param service - The service to write the data store to
|
|
1087
|
+
* @returns
|
|
1088
|
+
*/
|
|
1089
|
+
writeDataStoreToService: (container: Container, service: {
|
|
1090
|
+
id: string;
|
|
1091
|
+
version?: string;
|
|
1092
|
+
}, options?: {
|
|
1093
|
+
path?: string;
|
|
1094
|
+
format?: "md" | "mdx";
|
|
1095
|
+
override?: boolean;
|
|
1096
|
+
}) => Promise<void>;
|
|
1030
1097
|
};
|
|
1031
1098
|
|
|
1032
|
-
export { Channel, Command, CustomDoc, Domain, Entity, Event, EventCatalog, Message, Query, Service, Team, UbiquitousLanguageDictionary, User, _default as default };
|
|
1099
|
+
export { Channel, Command, Container, CustomDoc, Domain, Entity, Event, EventCatalog, Message, Query, Service, Team, UbiquitousLanguageDictionary, User, _default as default };
|