@eventcatalog/sdk 1.0.0 → 1.1.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/README.md CHANGED
@@ -44,4 +44,4 @@ await versionEvent('InventoryEvent');
44
44
  const service await getService('PaymentService');
45
45
  ```
46
46
 
47
- See the [SDK docs](https://www.eventcatalog.dev/docs/sdk) for more information and examples.
47
+ See the [SDK docs](https://www.eventcatalog.dev/docs/sdk) for more information and examples
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Event, Command, Service, Domain } from './types.d.mjs';
1
+ import { Event, Command, Query, Service, Domain } from './types.d.mjs';
2
2
 
3
3
  /**
4
4
  * Init the SDK for EventCatalog
@@ -170,6 +170,90 @@ declare const _default: (path: string) => {
170
170
  * @returns
171
171
  */
172
172
  commandHasVersion: (id: string, version: string) => Promise<boolean>;
173
+ /**
174
+ * ================================
175
+ * Queries
176
+ * ================================
177
+ */
178
+ /**
179
+ * Returns a query from EventCatalog
180
+ * @param id - The id of the query to retrieve
181
+ * @param version - Optional id of the version to get (supports semver)
182
+ * @returns Query|Undefined
183
+ */
184
+ getQuery: (id: string, version?: string) => Promise<Query>;
185
+ /**
186
+ * Adds a query to EventCatalog
187
+ *
188
+ * @param query - The query to write
189
+ * @param options - Optional options to write the event
190
+ *
191
+ */
192
+ writeQuery: (query: Query, options?: {
193
+ path: string;
194
+ }) => Promise<void>;
195
+ /**
196
+ * Adds a query to a service in EventCatalog
197
+ *
198
+ * @param query - The query to write to the service
199
+ * @param service - The service and it's id to write to the query to
200
+ * @param options - Optional options to write the query
201
+ *
202
+ */
203
+ writeQueryToService: (query: Query, service: {
204
+ id: string;
205
+ version?: string;
206
+ }, options?: {
207
+ path: string;
208
+ }) => Promise<void>;
209
+ /**
210
+ * Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
211
+ *
212
+ * @param path - The path to your query, e.g. `/Orders/GetOrder`
213
+ *
214
+ */
215
+ rmQuery: (path: string) => Promise<void>;
216
+ /**
217
+ * Remove a query by a Query id
218
+ *
219
+ * @param id - The id of the query you want to remove
220
+ *
221
+ */
222
+ rmQueryById: (id: string, version?: string) => Promise<void>;
223
+ /**
224
+ * Moves a given query id to the version directory
225
+ * @param directory
226
+ */
227
+ versionQuery: (id: string) => Promise<void>;
228
+ /**
229
+ * Adds a file to the given query
230
+ * @param id - The id of the query to add the file to
231
+ * @param file - File contents to add including the content and the file name
232
+ * @param version - Optional version of the query to add the file to
233
+ * @returns
234
+ */
235
+ addFileToQuery: (id: string, file: {
236
+ content: string;
237
+ fileName: string;
238
+ }, version?: string) => Promise<void>;
239
+ /**
240
+ * Adds a schema to the given query
241
+ * @param id - The id of the query to add the schema to
242
+ * @param schema - Schema contents to add including the content and the file name
243
+ * @param version - Optional version of the query to add the schema to
244
+ * @returns
245
+ */
246
+ addSchemaToQuery: (id: string, schema: {
247
+ schema: string;
248
+ fileName: string;
249
+ }, version?: string) => Promise<void>;
250
+ /**
251
+ * Check to see if an query version exists
252
+ * @param id - The id of the query
253
+ * @param version - The version of the query (supports semver)
254
+ * @returns
255
+ */
256
+ queryHasVersion: (id: string, version: string) => Promise<boolean>;
173
257
  /**
174
258
  * ================================
175
259
  * SERVICES
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Event, Command, Service, Domain } from './types.d.js';
1
+ import { Event, Command, Query, Service, Domain } from './types.d.js';
2
2
 
3
3
  /**
4
4
  * Init the SDK for EventCatalog
@@ -170,6 +170,90 @@ declare const _default: (path: string) => {
170
170
  * @returns
171
171
  */
172
172
  commandHasVersion: (id: string, version: string) => Promise<boolean>;
173
+ /**
174
+ * ================================
175
+ * Queries
176
+ * ================================
177
+ */
178
+ /**
179
+ * Returns a query from EventCatalog
180
+ * @param id - The id of the query to retrieve
181
+ * @param version - Optional id of the version to get (supports semver)
182
+ * @returns Query|Undefined
183
+ */
184
+ getQuery: (id: string, version?: string) => Promise<Query>;
185
+ /**
186
+ * Adds a query to EventCatalog
187
+ *
188
+ * @param query - The query to write
189
+ * @param options - Optional options to write the event
190
+ *
191
+ */
192
+ writeQuery: (query: Query, options?: {
193
+ path: string;
194
+ }) => Promise<void>;
195
+ /**
196
+ * Adds a query to a service in EventCatalog
197
+ *
198
+ * @param query - The query to write to the service
199
+ * @param service - The service and it's id to write to the query to
200
+ * @param options - Optional options to write the query
201
+ *
202
+ */
203
+ writeQueryToService: (query: Query, service: {
204
+ id: string;
205
+ version?: string;
206
+ }, options?: {
207
+ path: string;
208
+ }) => Promise<void>;
209
+ /**
210
+ * Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
211
+ *
212
+ * @param path - The path to your query, e.g. `/Orders/GetOrder`
213
+ *
214
+ */
215
+ rmQuery: (path: string) => Promise<void>;
216
+ /**
217
+ * Remove a query by a Query id
218
+ *
219
+ * @param id - The id of the query you want to remove
220
+ *
221
+ */
222
+ rmQueryById: (id: string, version?: string) => Promise<void>;
223
+ /**
224
+ * Moves a given query id to the version directory
225
+ * @param directory
226
+ */
227
+ versionQuery: (id: string) => Promise<void>;
228
+ /**
229
+ * Adds a file to the given query
230
+ * @param id - The id of the query to add the file to
231
+ * @param file - File contents to add including the content and the file name
232
+ * @param version - Optional version of the query to add the file to
233
+ * @returns
234
+ */
235
+ addFileToQuery: (id: string, file: {
236
+ content: string;
237
+ fileName: string;
238
+ }, version?: string) => Promise<void>;
239
+ /**
240
+ * Adds a schema to the given query
241
+ * @param id - The id of the query to add the schema to
242
+ * @param schema - Schema contents to add including the content and the file name
243
+ * @param version - Optional version of the query to add the schema to
244
+ * @returns
245
+ */
246
+ addSchemaToQuery: (id: string, schema: {
247
+ schema: string;
248
+ fileName: string;
249
+ }, version?: string) => Promise<void>;
250
+ /**
251
+ * Check to see if an query version exists
252
+ * @param id - The id of the query
253
+ * @param version - The version of the query (supports semver)
254
+ * @returns
255
+ */
256
+ queryHasVersion: (id: string, version: string) => Promise<boolean>;
173
257
  /**
174
258
  * ================================
175
259
  * SERVICES
package/dist/index.js CHANGED
@@ -33,7 +33,7 @@ __export(src_exports, {
33
33
  default: () => src_default
34
34
  });
35
35
  module.exports = __toCommonJS(src_exports);
36
- var import_node_path6 = require("path");
36
+ var import_node_path7 = require("path");
37
37
 
38
38
  // src/events.ts
39
39
  var import_promises3 = __toESM(require("fs/promises"));
@@ -242,9 +242,35 @@ var commandHasVersion = (directory) => async (id, version) => {
242
242
  return !!file;
243
243
  };
244
244
 
245
- // src/services.ts
245
+ // src/queries.ts
246
246
  var import_promises5 = __toESM(require("fs/promises"));
247
247
  var import_node_path4 = require("path");
248
+ var getQuery = (directory) => async (id, version) => getResource(directory, id, version, { type: "query" });
249
+ var writeQuery = (directory) => async (query, options = { path: "" }) => writeResource(directory, { ...query }, { ...options, type: "query" });
250
+ var writeQueryToService = (directory) => async (query, service, options = { path: "" }) => {
251
+ let pathForQuery = service.version && service.version !== "latest" ? `/${service.id}/versioned/${service.version}/queries` : `/${service.id}/queries`;
252
+ pathForQuery = (0, import_node_path4.join)(pathForQuery, query.id);
253
+ await writeResource(directory, { ...query }, { ...options, path: pathForQuery, type: "query" });
254
+ };
255
+ var rmQuery = (directory) => async (path) => {
256
+ await import_promises5.default.rm((0, import_node_path4.join)(directory, path), { recursive: true });
257
+ };
258
+ var rmQueryById = (directory) => async (id, version) => {
259
+ await rmResourceById(directory, id, version, { type: "query" });
260
+ };
261
+ var versionQuery = (directory) => async (id) => versionResource(directory, id);
262
+ var addFileToQuery = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
263
+ var addSchemaToQuery = (directory) => async (id, schema, version) => {
264
+ await addFileToQuery(directory)(id, { content: schema.schema, fileName: schema.fileName }, version);
265
+ };
266
+ var queryHasVersion = (directory) => async (id, version) => {
267
+ const file = await findFileById(directory, id, version);
268
+ return !!file;
269
+ };
270
+
271
+ // src/services.ts
272
+ var import_promises6 = __toESM(require("fs/promises"));
273
+ var import_node_path5 = require("path");
248
274
  var getService = (directory) => async (id, version) => getResource(directory, id, version, { type: "service" });
249
275
  var writeService = (directory) => async (service, options = { path: "" }) => {
250
276
  const resource = { ...service };
@@ -258,12 +284,12 @@ var writeService = (directory) => async (service, options = { path: "" }) => {
258
284
  };
259
285
  var writeServiceToDomain = (directory) => async (service, domain, options = { path: "" }) => {
260
286
  let pathForService = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/services` : `/${domain.id}/services`;
261
- pathForService = (0, import_node_path4.join)(pathForService, service.id);
287
+ pathForService = (0, import_node_path5.join)(pathForService, service.id);
262
288
  await writeResource(directory, { ...service }, { ...options, path: pathForService, type: "service" });
263
289
  };
264
290
  var versionService = (directory) => async (id) => versionResource(directory, id);
265
291
  var rmService = (directory) => async (path) => {
266
- await import_promises5.default.rm((0, import_node_path4.join)(directory, path), { recursive: true });
292
+ await import_promises6.default.rm((0, import_node_path5.join)(directory, path), { recursive: true });
267
293
  };
268
294
  var rmServiceById = (directory) => async (id, version) => rmResourceById(directory, id, version, { type: "service" });
269
295
  var addFileToService = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
@@ -281,7 +307,7 @@ var getSpecificationFilesForService = (directory) => async (id, version) => {
281
307
  throw new Error(`Specification file name for ${specFile} is undefined`);
282
308
  }
283
309
  const rawFile = await getFileFromResource(directory, id, { fileName }, version);
284
- return { key: specFile, content: rawFile, fileName, path: (0, import_node_path4.join)((0, import_node_path4.dirname)(filePathToService), fileName) };
310
+ return { key: specFile, content: rawFile, fileName, path: (0, import_node_path5.join)((0, import_node_path5.dirname)(filePathToService), fileName) };
285
311
  });
286
312
  specs = await Promise.all(getSpecs);
287
313
  }
@@ -321,13 +347,13 @@ var serviceHasVersion = (directory) => async (id, version) => {
321
347
  };
322
348
 
323
349
  // src/domains.ts
324
- var import_promises6 = __toESM(require("fs/promises"));
325
- var import_node_path5 = require("path");
350
+ var import_promises7 = __toESM(require("fs/promises"));
351
+ var import_node_path6 = require("path");
326
352
  var getDomain = (directory) => async (id, version) => getResource(directory, id, version, { type: "domain" });
327
353
  var writeDomain = (directory) => async (domain, options = { path: "" }) => writeResource(directory, { ...domain }, { ...options, type: "domain" });
328
354
  var versionDomain = (directory) => async (id) => versionResource(directory, id);
329
355
  var rmDomain = (directory) => async (path) => {
330
- await import_promises6.default.rm((0, import_node_path5.join)(directory, path), { recursive: true });
356
+ await import_promises7.default.rm((0, import_node_path6.join)(directory, path), { recursive: true });
331
357
  };
332
358
  var rmDomainById = (directory) => async (id, version) => rmResourceById(directory, id, version, { type: "domain" });
333
359
  var addFileToDomain = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
@@ -358,7 +384,7 @@ var src_default = (path) => {
358
384
  * @param version - Optional id of the version to get (supports semver)
359
385
  * @returns Event|Undefined
360
386
  */
361
- getEvent: getEvent((0, import_node_path6.join)(path)),
387
+ getEvent: getEvent((0, import_node_path7.join)(path)),
362
388
  /**
363
389
  * Adds an event to EventCatalog
364
390
  *
@@ -366,7 +392,7 @@ var src_default = (path) => {
366
392
  * @param options - Optional options to write the event
367
393
  *
368
394
  */
369
- writeEvent: writeEvent((0, import_node_path6.join)(path, "events")),
395
+ writeEvent: writeEvent((0, import_node_path7.join)(path, "events")),
370
396
  /**
371
397
  * Adds an event to a service in EventCatalog
372
398
  *
@@ -375,26 +401,26 @@ var src_default = (path) => {
375
401
  * @param options - Optional options to write the event
376
402
  *
377
403
  */
378
- writeEventToService: writeEventToService((0, import_node_path6.join)(path, "services")),
404
+ writeEventToService: writeEventToService((0, import_node_path7.join)(path, "services")),
379
405
  /**
380
406
  * Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
381
407
  *
382
408
  * @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
383
409
  *
384
410
  */
385
- rmEvent: rmEvent((0, import_node_path6.join)(path, "events")),
411
+ rmEvent: rmEvent((0, import_node_path7.join)(path, "events")),
386
412
  /**
387
413
  * Remove an event by an Event id
388
414
  *
389
415
  * @param id - The id of the event you want to remove
390
416
  *
391
417
  */
392
- rmEventById: rmEventById((0, import_node_path6.join)(path)),
418
+ rmEventById: rmEventById((0, import_node_path7.join)(path)),
393
419
  /**
394
420
  * Moves a given event id to the version directory
395
421
  * @param directory
396
422
  */
397
- versionEvent: versionEvent((0, import_node_path6.join)(path)),
423
+ versionEvent: versionEvent((0, import_node_path7.join)(path)),
398
424
  /**
399
425
  * Adds a file to the given event
400
426
  * @param id - The id of the event to add the file to
@@ -402,7 +428,7 @@ var src_default = (path) => {
402
428
  * @param version - Optional version of the event to add the file to
403
429
  * @returns
404
430
  */
405
- addFileToEvent: addFileToEvent((0, import_node_path6.join)(path)),
431
+ addFileToEvent: addFileToEvent((0, import_node_path7.join)(path)),
406
432
  /**
407
433
  * Adds a schema to the given event
408
434
  * @param id - The id of the event to add the schema to
@@ -410,14 +436,14 @@ var src_default = (path) => {
410
436
  * @param version - Optional version of the event to add the schema to
411
437
  * @returns
412
438
  */
413
- addSchemaToEvent: addSchemaToEvent((0, import_node_path6.join)(path)),
439
+ addSchemaToEvent: addSchemaToEvent((0, import_node_path7.join)(path)),
414
440
  /**
415
441
  * Check to see if an event version exists
416
442
  * @param id - The id of the event
417
443
  * @param version - The version of the event (supports semver)
418
444
  * @returns
419
445
  */
420
- eventHasVersion: eventHasVersion((0, import_node_path6.join)(path)),
446
+ eventHasVersion: eventHasVersion((0, import_node_path7.join)(path)),
421
447
  /**
422
448
  * ================================
423
449
  * Commands
@@ -429,7 +455,7 @@ var src_default = (path) => {
429
455
  * @param version - Optional id of the version to get (supports semver)
430
456
  * @returns Command|Undefined
431
457
  */
432
- getCommand: getCommand((0, import_node_path6.join)(path)),
458
+ getCommand: getCommand((0, import_node_path7.join)(path)),
433
459
  /**
434
460
  * Adds an command to EventCatalog
435
461
  *
@@ -437,7 +463,7 @@ var src_default = (path) => {
437
463
  * @param options - Optional options to write the command
438
464
  *
439
465
  */
440
- writeCommand: writeCommand((0, import_node_path6.join)(path, "commands")),
466
+ writeCommand: writeCommand((0, import_node_path7.join)(path, "commands")),
441
467
  /**
442
468
  * Adds a command to a service in EventCatalog
443
469
  *
@@ -446,26 +472,26 @@ var src_default = (path) => {
446
472
  * @param options - Optional options to write the command
447
473
  *
448
474
  */
449
- writeCommandToService: writeCommandToService((0, import_node_path6.join)(path, "services")),
475
+ writeCommandToService: writeCommandToService((0, import_node_path7.join)(path, "services")),
450
476
  /**
451
477
  * Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
452
478
  *
453
479
  * @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
454
480
  *
455
481
  */
456
- rmCommand: rmCommand((0, import_node_path6.join)(path, "commands")),
482
+ rmCommand: rmCommand((0, import_node_path7.join)(path, "commands")),
457
483
  /**
458
484
  * Remove an command by an Event id
459
485
  *
460
486
  * @param id - The id of the command you want to remove
461
487
  *
462
488
  */
463
- rmCommandById: rmCommandById((0, import_node_path6.join)(path)),
489
+ rmCommandById: rmCommandById((0, import_node_path7.join)(path)),
464
490
  /**
465
491
  * Moves a given command id to the version directory
466
492
  * @param directory
467
493
  */
468
- versionCommand: versionCommand((0, import_node_path6.join)(path)),
494
+ versionCommand: versionCommand((0, import_node_path7.join)(path)),
469
495
  /**
470
496
  * Adds a file to the given command
471
497
  * @param id - The id of the command to add the file to
@@ -473,7 +499,7 @@ var src_default = (path) => {
473
499
  * @param version - Optional version of the command to add the file to
474
500
  * @returns
475
501
  */
476
- addFileToCommand: addFileToCommand((0, import_node_path6.join)(path)),
502
+ addFileToCommand: addFileToCommand((0, import_node_path7.join)(path)),
477
503
  /**
478
504
  * Adds a schema to the given command
479
505
  * @param id - The id of the command to add the schema to
@@ -481,14 +507,85 @@ var src_default = (path) => {
481
507
  * @param version - Optional version of the command to add the schema to
482
508
  * @returns
483
509
  */
484
- addSchemaToCommand: addSchemaToCommand((0, import_node_path6.join)(path)),
510
+ addSchemaToCommand: addSchemaToCommand((0, import_node_path7.join)(path)),
485
511
  /**
486
512
  * Check to see if a command version exists
487
513
  * @param id - The id of the command
488
514
  * @param version - The version of the command (supports semver)
489
515
  * @returns
490
516
  */
491
- commandHasVersion: commandHasVersion((0, import_node_path6.join)(path)),
517
+ commandHasVersion: commandHasVersion((0, import_node_path7.join)(path)),
518
+ /**
519
+ * ================================
520
+ * Queries
521
+ * ================================
522
+ */
523
+ /**
524
+ * Returns a query from EventCatalog
525
+ * @param id - The id of the query to retrieve
526
+ * @param version - Optional id of the version to get (supports semver)
527
+ * @returns Query|Undefined
528
+ */
529
+ getQuery: getQuery((0, import_node_path7.join)(path)),
530
+ /**
531
+ * Adds a query to EventCatalog
532
+ *
533
+ * @param query - The query to write
534
+ * @param options - Optional options to write the event
535
+ *
536
+ */
537
+ writeQuery: writeQuery((0, import_node_path7.join)(path, "queries")),
538
+ /**
539
+ * Adds a query to a service in EventCatalog
540
+ *
541
+ * @param query - The query to write to the service
542
+ * @param service - The service and it's id to write to the query to
543
+ * @param options - Optional options to write the query
544
+ *
545
+ */
546
+ writeQueryToService: writeQueryToService((0, import_node_path7.join)(path, "services")),
547
+ /**
548
+ * Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
549
+ *
550
+ * @param path - The path to your query, e.g. `/Orders/GetOrder`
551
+ *
552
+ */
553
+ rmQuery: rmQuery((0, import_node_path7.join)(path, "queries")),
554
+ /**
555
+ * Remove a query by a Query id
556
+ *
557
+ * @param id - The id of the query you want to remove
558
+ *
559
+ */
560
+ rmQueryById: rmQueryById((0, import_node_path7.join)(path)),
561
+ /**
562
+ * Moves a given query id to the version directory
563
+ * @param directory
564
+ */
565
+ versionQuery: versionQuery((0, import_node_path7.join)(path)),
566
+ /**
567
+ * Adds a file to the given query
568
+ * @param id - The id of the query to add the file to
569
+ * @param file - File contents to add including the content and the file name
570
+ * @param version - Optional version of the query to add the file to
571
+ * @returns
572
+ */
573
+ addFileToQuery: addFileToQuery((0, import_node_path7.join)(path)),
574
+ /**
575
+ * Adds a schema to the given query
576
+ * @param id - The id of the query to add the schema to
577
+ * @param schema - Schema contents to add including the content and the file name
578
+ * @param version - Optional version of the query to add the schema to
579
+ * @returns
580
+ */
581
+ addSchemaToQuery: addSchemaToQuery((0, import_node_path7.join)(path)),
582
+ /**
583
+ * Check to see if an query version exists
584
+ * @param id - The id of the query
585
+ * @param version - The version of the query (supports semver)
586
+ * @returns
587
+ */
588
+ queryHasVersion: queryHasVersion((0, import_node_path7.join)(path)),
492
589
  /**
493
590
  * ================================
494
591
  * SERVICES
@@ -501,7 +598,7 @@ var src_default = (path) => {
501
598
  * @param options - Optional options to write the event
502
599
  *
503
600
  */
504
- writeService: writeService((0, import_node_path6.join)(path, "services")),
601
+ writeService: writeService((0, import_node_path7.join)(path, "services")),
505
602
  /**
506
603
  * Adds a service to a domain in EventCatalog
507
604
  *
@@ -510,33 +607,33 @@ var src_default = (path) => {
510
607
  * @param options - Optional options to write the event
511
608
  *
512
609
  */
513
- writeServiceToDomain: writeServiceToDomain((0, import_node_path6.join)(path, "domains")),
610
+ writeServiceToDomain: writeServiceToDomain((0, import_node_path7.join)(path, "domains")),
514
611
  /**
515
612
  * Returns a service from EventCatalog
516
613
  * @param id - The id of the service to retrieve
517
614
  * @param version - Optional id of the version to get (supports semver)
518
615
  * @returns Service|Undefined
519
616
  */
520
- getService: getService((0, import_node_path6.join)(path)),
617
+ getService: getService((0, import_node_path7.join)(path)),
521
618
  /**
522
619
  * Moves a given service id to the version directory
523
620
  * @param directory
524
621
  */
525
- versionService: versionService((0, import_node_path6.join)(path)),
622
+ versionService: versionService((0, import_node_path7.join)(path)),
526
623
  /**
527
624
  * Remove a service from EventCatalog (modeled on the standard POSIX rm utility)
528
625
  *
529
626
  * @param path - The path to your service, e.g. `/InventoryService`
530
627
  *
531
628
  */
532
- rmService: rmService((0, import_node_path6.join)(path, "services")),
629
+ rmService: rmService((0, import_node_path7.join)(path, "services")),
533
630
  /**
534
631
  * Remove an service by an service id
535
632
  *
536
633
  * @param id - The id of the service you want to remove
537
634
  *
538
635
  */
539
- rmServiceById: rmServiceById((0, import_node_path6.join)(path)),
636
+ rmServiceById: rmServiceById((0, import_node_path7.join)(path)),
540
637
  /**
541
638
  * Adds a file to the given service
542
639
  * @param id - The id of the service to add the file to
@@ -544,21 +641,21 @@ var src_default = (path) => {
544
641
  * @param version - Optional version of the service to add the file to
545
642
  * @returns
546
643
  */
547
- addFileToService: addFileToService((0, import_node_path6.join)(path)),
644
+ addFileToService: addFileToService((0, import_node_path7.join)(path)),
548
645
  /**
549
646
  * Returns the specifications for a given service
550
647
  * @param id - The id of the service to retrieve the specifications for
551
648
  * @param version - Optional version of the service
552
649
  * @returns
553
650
  */
554
- getSpecificationFilesForService: getSpecificationFilesForService((0, import_node_path6.join)(path)),
651
+ getSpecificationFilesForService: getSpecificationFilesForService((0, import_node_path7.join)(path)),
555
652
  /**
556
653
  * Check to see if a service version exists
557
654
  * @param id - The id of the service
558
655
  * @param version - The version of the service (supports semver)
559
656
  * @returns
560
657
  */
561
- serviceHasVersion: serviceHasVersion((0, import_node_path6.join)(path)),
658
+ serviceHasVersion: serviceHasVersion((0, import_node_path7.join)(path)),
562
659
  /**
563
660
  * ================================
564
661
  * Domains
@@ -571,33 +668,33 @@ var src_default = (path) => {
571
668
  * @param options - Optional options to write the event
572
669
  *
573
670
  */
574
- writeDomain: writeDomain((0, import_node_path6.join)(path, "domains")),
671
+ writeDomain: writeDomain((0, import_node_path7.join)(path, "domains")),
575
672
  /**
576
673
  * Returns a domain from EventCatalog
577
674
  * @param id - The id of the domain to retrieve
578
675
  * @param version - Optional id of the version to get (supports semver)
579
676
  * @returns Domain|Undefined
580
677
  */
581
- getDomain: getDomain((0, import_node_path6.join)(path, "domains")),
678
+ getDomain: getDomain((0, import_node_path7.join)(path, "domains")),
582
679
  /**
583
680
  * Moves a given domain id to the version directory
584
681
  * @param directory
585
682
  */
586
- versionDomain: versionDomain((0, import_node_path6.join)(path, "domains")),
683
+ versionDomain: versionDomain((0, import_node_path7.join)(path, "domains")),
587
684
  /**
588
685
  * Remove a domain from EventCatalog (modeled on the standard POSIX rm utility)
589
686
  *
590
687
  * @param path - The path to your domain, e.g. `/Payment`
591
688
  *
592
689
  */
593
- rmDomain: rmDomain((0, import_node_path6.join)(path, "domains")),
690
+ rmDomain: rmDomain((0, import_node_path7.join)(path, "domains")),
594
691
  /**
595
692
  * Remove an service by an domain id
596
693
  *
597
694
  * @param id - The id of the domain you want to remove
598
695
  *
599
696
  */
600
- rmDomainById: rmDomainById((0, import_node_path6.join)(path, "domains")),
697
+ rmDomainById: rmDomainById((0, import_node_path7.join)(path, "domains")),
601
698
  /**
602
699
  * Adds a file to the given domain
603
700
  * @param id - The id of the domain to add the file to
@@ -605,7 +702,7 @@ var src_default = (path) => {
605
702
  * @param version - Optional version of the domain to add the file to
606
703
  * @returns
607
704
  */
608
- addFileToDomain: addFileToDomain((0, import_node_path6.join)(path, "domains")),
705
+ addFileToDomain: addFileToDomain((0, import_node_path7.join)(path, "domains")),
609
706
  /**
610
707
  * Add an event to a service by it's id.
611
708
  *
@@ -625,7 +722,7 @@ var src_default = (path) => {
625
722
  *
626
723
  * ```
627
724
  */
628
- addEventToService: addMessageToService((0, import_node_path6.join)(path)),
725
+ addEventToService: addMessageToService((0, import_node_path7.join)(path)),
629
726
  /**
630
727
  * Add a command to a service by it's id.
631
728
  *
@@ -645,14 +742,14 @@ var src_default = (path) => {
645
742
  *
646
743
  * ```
647
744
  */
648
- addCommandToService: addMessageToService((0, import_node_path6.join)(path)),
745
+ addCommandToService: addMessageToService((0, import_node_path7.join)(path)),
649
746
  /**
650
747
  * Check to see if a domain version exists
651
748
  * @param id - The id of the domain
652
749
  * @param version - The version of the domain (supports semver)
653
750
  * @returns
654
751
  */
655
- domainHasVersion: domainHasVersion((0, import_node_path6.join)(path)),
752
+ domainHasVersion: domainHasVersion((0, import_node_path7.join)(path)),
656
753
  /**
657
754
  * Adds a given service to a domain
658
755
  * @param id - The id of the domain
@@ -660,7 +757,7 @@ var src_default = (path) => {
660
757
  * @param version - (Optional) The version of the domain to add the service to
661
758
  * @returns
662
759
  */
663
- addServiceToDomain: addServiceToDomain((0, import_node_path6.join)(path, "domains"))
760
+ addServiceToDomain: addServiceToDomain((0, import_node_path7.join)(path, "domains"))
664
761
  };
665
762
  };
666
763
  //# sourceMappingURL=index.js.map