@eventcatalog/sdk 2.20.0 → 2.21.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/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/index.ts
2
- import { join as join18 } from "path";
2
+ import { join as join19 } from "path";
3
3
 
4
4
  // src/dsl/utils.ts
5
5
  import { globSync } from "glob";
@@ -2486,13 +2486,393 @@ var entityHasVersion = (directory) => async (id, version) => {
2486
2486
  return !!file;
2487
2487
  };
2488
2488
 
2489
+ // src/flows.ts
2490
+ import fs14 from "fs/promises";
2491
+ import { join as join15 } from "path";
2492
+
2493
+ // src/flow-builder.ts
2494
+ var cloneStep = (step) => ({
2495
+ ...step,
2496
+ ...step.message ? { message: { ...step.message } } : {},
2497
+ ...step.service ? { service: { ...step.service } } : {},
2498
+ ...step.flow ? { flow: { ...step.flow } } : {},
2499
+ ...step.actor ? { actor: { ...step.actor } } : {},
2500
+ ...step.custom ? {
2501
+ custom: {
2502
+ ...step.custom,
2503
+ ...step.custom.properties ? { properties: { ...step.custom.properties } } : {},
2504
+ ...step.custom.menu ? { menu: step.custom.menu.map((item) => ({ ...item })) } : {}
2505
+ }
2506
+ } : {},
2507
+ ...step.externalSystem ? { externalSystem: { ...step.externalSystem } } : {},
2508
+ ...step.next_step !== void 0 ? { next_step: typeof step.next_step === "object" ? { ...step.next_step } : step.next_step } : {},
2509
+ ...step.next_steps ? { next_steps: step.next_steps.map((next) => typeof next === "object" ? { ...next } : next) } : {}
2510
+ });
2511
+ var FlowBuilder = class _FlowBuilder {
2512
+ constructor(flow) {
2513
+ this.steps = /* @__PURE__ */ new Map();
2514
+ this.order = [];
2515
+ this.flowResource = { ...flow };
2516
+ for (const step of flow.steps || []) {
2517
+ this.appendStep(cloneStep(step));
2518
+ }
2519
+ }
2520
+ /**
2521
+ * Create a flow builder.
2522
+ *
2523
+ * The created builder can add steps and then produce a normal `Flow` resource
2524
+ * with `build()`.
2525
+ *
2526
+ * @example
2527
+ * ```ts
2528
+ * const flow = FlowBuilder.create({
2529
+ * id: 'PaymentFlow',
2530
+ * name: 'Payment Flow',
2531
+ * version: '1.0.0',
2532
+ * markdown: '# Payment Flow',
2533
+ * }).build();
2534
+ * ```
2535
+ */
2536
+ static create(flow) {
2537
+ return new _FlowBuilder(flow);
2538
+ }
2539
+ /**
2540
+ * Add a generic flow step.
2541
+ *
2542
+ * Generic steps are useful for business process stages that do not map to
2543
+ * another catalog resource.
2544
+ *
2545
+ * @param step - The step payload.
2546
+ *
2547
+ * @example
2548
+ * ```ts
2549
+ * FlowBuilder.create({
2550
+ * id: 'OrderFlow',
2551
+ * name: 'Order Flow',
2552
+ * version: '1.0.0',
2553
+ * markdown: '',
2554
+ * })
2555
+ * .addStep({
2556
+ * id: 'Calculate',
2557
+ * title: 'Calculate totals',
2558
+ * nextSteps: [{ id: 'OrderConfirmed' }],
2559
+ * });
2560
+ * ```
2561
+ */
2562
+ addStep(step) {
2563
+ return this.addStepWithNext(
2564
+ {
2565
+ id: step.id,
2566
+ title: step.title || String(step.id),
2567
+ ...step.summary ? { summary: step.summary } : {}
2568
+ },
2569
+ step.nextSteps
2570
+ );
2571
+ }
2572
+ /**
2573
+ * Add a message step.
2574
+ *
2575
+ * Message steps can reference an event, command, or query id.
2576
+ *
2577
+ * @param step - The message step payload.
2578
+ *
2579
+ * @example
2580
+ * ```ts
2581
+ * FlowBuilder.create({
2582
+ * id: 'OrderFlow',
2583
+ * name: 'Order Flow',
2584
+ * version: '1.0.0',
2585
+ * markdown: '',
2586
+ * })
2587
+ * .addMessageStep({
2588
+ * id: 'OrderConfirmed',
2589
+ * title: 'Order confirmed',
2590
+ * message: { id: 'OrderConfirmed', version: '1.0.0' },
2591
+ * });
2592
+ * ```
2593
+ */
2594
+ addMessageStep(step) {
2595
+ const message = step.message || {
2596
+ id: String(step.id),
2597
+ ...step.version ? { version: step.version } : {}
2598
+ };
2599
+ return this.addStepWithNext(
2600
+ {
2601
+ id: step.id,
2602
+ title: step.title || String(step.id),
2603
+ ...step.summary ? { summary: step.summary } : {},
2604
+ message: { ...message, ...step.version && !message.version ? { version: step.version } : {} }
2605
+ },
2606
+ step.nextSteps
2607
+ );
2608
+ }
2609
+ /**
2610
+ * Add a service step.
2611
+ *
2612
+ * @param step - The service step payload.
2613
+ *
2614
+ * @example
2615
+ * ```ts
2616
+ * FlowBuilder.create({
2617
+ * id: 'OrderFlow',
2618
+ * name: 'Order Flow',
2619
+ * version: '1.0.0',
2620
+ * markdown: '',
2621
+ * })
2622
+ * .addServiceStep({
2623
+ * id: 'OrderService',
2624
+ * service: { id: 'OrderService', version: '1.0.0' },
2625
+ * });
2626
+ * ```
2627
+ */
2628
+ addServiceStep(step) {
2629
+ const service = step.service || {
2630
+ id: String(step.id),
2631
+ ...step.version ? { version: step.version } : {}
2632
+ };
2633
+ return this.addStepWithNext(
2634
+ {
2635
+ id: step.id,
2636
+ title: step.title || String(step.id),
2637
+ ...step.summary ? { summary: step.summary } : {},
2638
+ service: { ...service, ...step.version && !service.version ? { version: step.version } : {} }
2639
+ },
2640
+ step.nextSteps
2641
+ );
2642
+ }
2643
+ /**
2644
+ * Add an actor step.
2645
+ *
2646
+ * @param step - The actor step payload.
2647
+ *
2648
+ * @example
2649
+ * ```ts
2650
+ * FlowBuilder.create({
2651
+ * id: 'OrderFlow',
2652
+ * name: 'Order Flow',
2653
+ * version: '1.0.0',
2654
+ * markdown: '',
2655
+ * })
2656
+ * .addActorStep({
2657
+ * id: 'Customer',
2658
+ * actor: { name: 'Customer' },
2659
+ * });
2660
+ * ```
2661
+ */
2662
+ addActorStep(step) {
2663
+ const actor = step.actor || {
2664
+ name: step.name || step.title || String(step.id),
2665
+ ...step.summary ? { summary: step.summary } : {}
2666
+ };
2667
+ return this.addStepWithNext(
2668
+ {
2669
+ id: step.id,
2670
+ title: step.title || actor.name,
2671
+ ...step.summary ? { summary: step.summary } : {},
2672
+ actor
2673
+ },
2674
+ step.nextSteps
2675
+ );
2676
+ }
2677
+ /**
2678
+ * Add an external system step.
2679
+ *
2680
+ * @param step - The external system step payload.
2681
+ *
2682
+ * @example
2683
+ * ```ts
2684
+ * FlowBuilder.create({
2685
+ * id: 'PaymentFlow',
2686
+ * name: 'Payment Flow',
2687
+ * version: '1.0.0',
2688
+ * markdown: '',
2689
+ * })
2690
+ * .addExternalSystemStep({
2691
+ * id: 'Stripe',
2692
+ * externalSystem: {
2693
+ * name: 'Stripe',
2694
+ * summary: 'Payment provider',
2695
+ * url: 'https://stripe.com',
2696
+ * },
2697
+ * });
2698
+ * ```
2699
+ */
2700
+ addExternalSystemStep(step) {
2701
+ const externalSystem = step.externalSystem || {
2702
+ name: step.name || step.title || String(step.id),
2703
+ ...step.summary ? { summary: step.summary } : {},
2704
+ ...step.url ? { url: step.url } : {}
2705
+ };
2706
+ return this.addStepWithNext(
2707
+ {
2708
+ id: step.id,
2709
+ title: step.title || externalSystem.name,
2710
+ ...step.summary ? { summary: step.summary } : {},
2711
+ externalSystem
2712
+ },
2713
+ step.nextSteps
2714
+ );
2715
+ }
2716
+ /**
2717
+ * Add a sub-flow step.
2718
+ *
2719
+ * @param step - The sub-flow step payload.
2720
+ *
2721
+ * @example
2722
+ * ```ts
2723
+ * FlowBuilder.create({
2724
+ * id: 'OrderFlow',
2725
+ * name: 'Order Flow',
2726
+ * version: '1.0.0',
2727
+ * markdown: '',
2728
+ * })
2729
+ * .addFlowStep({
2730
+ * id: 'PaymentFlow',
2731
+ * flow: { id: 'PaymentFlow', version: '1.0.0' },
2732
+ * });
2733
+ * ```
2734
+ */
2735
+ addFlowStep(step) {
2736
+ const flow = step.flow || {
2737
+ id: String(step.id),
2738
+ ...step.version ? { version: step.version } : {}
2739
+ };
2740
+ return this.addStepWithNext(
2741
+ {
2742
+ id: step.id,
2743
+ title: step.title || String(step.id),
2744
+ ...step.summary ? { summary: step.summary } : {},
2745
+ flow: { ...flow, ...step.version && !flow.version ? { version: step.version } : {} }
2746
+ },
2747
+ step.nextSteps
2748
+ );
2749
+ }
2750
+ /**
2751
+ * Add a custom flow step.
2752
+ *
2753
+ * @param step - The custom step payload.
2754
+ *
2755
+ * @example
2756
+ * ```ts
2757
+ * FlowBuilder.create({
2758
+ * id: 'PaymentFlow',
2759
+ * name: 'Payment Flow',
2760
+ * version: '1.0.0',
2761
+ * markdown: '',
2762
+ * })
2763
+ * .addCustomStep({
2764
+ * id: 'ManualReview',
2765
+ * custom: {
2766
+ * title: 'Manual review',
2767
+ * type: 'manual',
2768
+ * },
2769
+ * });
2770
+ * ```
2771
+ */
2772
+ addCustomStep(step) {
2773
+ const custom = step.custom || {
2774
+ title: step.title || String(step.id),
2775
+ ...step.icon ? { icon: step.icon } : {},
2776
+ ...step.type ? { type: step.type } : {},
2777
+ ...step.summary ? { summary: step.summary } : {},
2778
+ ...step.url ? { url: step.url } : {},
2779
+ ...step.color ? { color: step.color } : {},
2780
+ ...step.properties ? { properties: step.properties } : {},
2781
+ ...step.height ? { height: step.height } : {},
2782
+ ...step.menu ? { menu: step.menu } : {}
2783
+ };
2784
+ return this.addStepWithNext(
2785
+ {
2786
+ id: step.id,
2787
+ title: step.title || custom.title,
2788
+ ...step.summary ? { summary: step.summary } : {},
2789
+ custom
2790
+ },
2791
+ step.nextSteps
2792
+ );
2793
+ }
2794
+ /**
2795
+ * Build the EventCatalog flow resource.
2796
+ *
2797
+ * @returns A `Flow` resource that can be written with `writeFlow`.
2798
+ */
2799
+ build() {
2800
+ this.validateNextSteps();
2801
+ const { steps: _steps, ...flow } = this.flowResource;
2802
+ return {
2803
+ ...flow,
2804
+ steps: this.order.map((id) => cloneStep(this.steps.get(id)))
2805
+ };
2806
+ }
2807
+ addStepWithNext(step, nextSteps) {
2808
+ const normalizedNextSteps = nextSteps?.map((next) => typeof next === "object" ? { ...next } : { id: next }) || [];
2809
+ if (normalizedNextSteps.length === 1) {
2810
+ step.next_step = normalizedNextSteps[0];
2811
+ } else if (normalizedNextSteps.length > 1) {
2812
+ step.next_steps = normalizedNextSteps;
2813
+ }
2814
+ this.appendStep(step);
2815
+ return this;
2816
+ }
2817
+ appendStep(step) {
2818
+ if (this.steps.has(step.id)) {
2819
+ throw new Error(`Flow step with id "${step.id}" already exists`);
2820
+ }
2821
+ this.steps.set(step.id, step);
2822
+ this.order.push(step.id);
2823
+ }
2824
+ validateNextSteps() {
2825
+ for (const step of this.steps.values()) {
2826
+ const nextSteps = step.next_step !== void 0 ? [step.next_step] : step.next_steps || [];
2827
+ for (const next of nextSteps) {
2828
+ const nextStepId = typeof next === "object" && next ? next.id : next;
2829
+ if (!this.steps.has(nextStepId)) {
2830
+ throw new Error(`Flow step "${step.id}" references missing next step "${nextStepId}"`);
2831
+ }
2832
+ }
2833
+ }
2834
+ }
2835
+ };
2836
+
2489
2837
  // src/flows.ts
2490
2838
  var getFlow = (directory) => async (id, version) => getResource(directory, id, version, { type: "flow" });
2491
2839
  var getFlows = (directory) => async (options) => getResources(directory, { type: "flows", latestOnly: options?.latestOnly });
2840
+ var writeFlow = (directory) => async (flow, options = {
2841
+ path: "",
2842
+ override: false,
2843
+ format: "mdx"
2844
+ }) => writeResource(directory, { ...flow }, { ...options, type: "flow" });
2845
+ var writeVersionedFlow = (directory) => async (flow) => {
2846
+ const path8 = getVersionedDirectory(flow.id, flow.version);
2847
+ return await writeFlow(directory)({ ...flow }, { path: path8 });
2848
+ };
2849
+ var writeFlowToDomain = (directory) => async (flow, domain, options = { path: "", format: "mdx", override: false }) => {
2850
+ let pathForFlow = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/flows` : `/${domain.id}/flows`;
2851
+ pathForFlow = join15(pathForFlow, flow.id);
2852
+ await writeResource(directory, { ...flow }, { ...options, path: pathForFlow, type: "flow" });
2853
+ };
2854
+ var writeFlowToService = (directory) => async (flow, service, options = { path: "", format: "mdx", override: false }) => {
2855
+ let pathForFlow = service.version && service.version !== "latest" ? `/${service.id}/versioned/${service.version}/flows` : `/${service.id}/flows`;
2856
+ pathForFlow = join15(pathForFlow, flow.id);
2857
+ await writeResource(directory, { ...flow }, { ...options, path: pathForFlow, type: "flow" });
2858
+ };
2859
+ var rmFlow = (directory) => async (path8) => {
2860
+ await fs14.rm(join15(directory, path8), { recursive: true });
2861
+ invalidateFileCache();
2862
+ };
2863
+ var rmFlowById = (directory) => async (id, version, persistFiles) => {
2864
+ await rmResourceById(directory, id, version, { type: "flow", persistFiles });
2865
+ };
2866
+ var versionFlow = (directory) => async (id) => versionResource(directory, id);
2867
+ var flowHasVersion = (directory) => async (id, version) => {
2868
+ const file = await findFileById(directory, id, version);
2869
+ return !!file;
2870
+ };
2871
+ var addFileToFlow = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version, { type: "flow" });
2492
2872
 
2493
2873
  // src/containers.ts
2494
- import fs14 from "fs/promises";
2495
- import { join as join15 } from "path";
2874
+ import fs15 from "fs/promises";
2875
+ import { join as join16 } from "path";
2496
2876
  var getContainer = (directory) => async (id, version) => getResource(directory, id, version, { type: "container" });
2497
2877
  var getContainers = (directory) => async (options) => getResources(directory, { type: "containers", latestOnly: options?.latestOnly });
2498
2878
  var writeContainer = (directory) => async (data, options = {
@@ -2502,7 +2882,7 @@ var writeContainer = (directory) => async (data, options = {
2502
2882
  }) => writeResource(directory, { ...data }, { ...options, type: "container" });
2503
2883
  var versionContainer = (directory) => async (id) => versionResource(directory, id);
2504
2884
  var rmContainer = (directory) => async (path8) => {
2505
- await fs14.rm(join15(directory, path8), { recursive: true });
2885
+ await fs15.rm(join16(directory, path8), { recursive: true });
2506
2886
  invalidateFileCache();
2507
2887
  };
2508
2888
  var rmContainerById = (directory) => async (id, version, persistFiles) => {
@@ -2519,7 +2899,7 @@ var writeContainerToService = (directory) => async (container, service, options
2519
2899
  throw new Error("Service not found");
2520
2900
  }
2521
2901
  let pathForContainer = service.version && service.version !== "latest" ? `${resourcePath.directory}/versioned/${service.version}/containers` : `${resourcePath.directory}/containers`;
2522
- pathForContainer = join15(pathForContainer, container.id);
2902
+ pathForContainer = join16(pathForContainer, container.id);
2523
2903
  await writeResource(directory, { ...container }, { ...options, path: pathForContainer, type: "container" });
2524
2904
  };
2525
2905
 
@@ -2535,8 +2915,8 @@ var addFileToDataStore = addFileToContainer;
2535
2915
  var writeDataStoreToService = writeContainerToService;
2536
2916
 
2537
2917
  // src/data-products.ts
2538
- import fs15 from "fs/promises";
2539
- import { join as join16 } from "path";
2918
+ import fs16 from "fs/promises";
2919
+ import { join as join17 } from "path";
2540
2920
  var getDataProduct = (directory) => async (id, version) => getResource(directory, id, version, { type: "data-product" });
2541
2921
  var getDataProducts = (directory) => async (options) => getResources(directory, { type: "data-products", latestOnly: options?.latestOnly });
2542
2922
  var writeDataProduct = (directory) => async (dataProduct, options = {
@@ -2546,11 +2926,11 @@ var writeDataProduct = (directory) => async (dataProduct, options = {
2546
2926
  }) => writeResource(directory, { ...dataProduct }, { ...options, type: "data-product" });
2547
2927
  var writeDataProductToDomain = (directory) => async (dataProduct, domain, options = { path: "", format: "mdx", override: false }) => {
2548
2928
  let pathForDataProduct = domain.version && domain.version !== "latest" ? `/${domain.id}/versioned/${domain.version}/data-products` : `/${domain.id}/data-products`;
2549
- pathForDataProduct = join16(pathForDataProduct, dataProduct.id);
2929
+ pathForDataProduct = join17(pathForDataProduct, dataProduct.id);
2550
2930
  await writeResource(directory, { ...dataProduct }, { ...options, path: pathForDataProduct, type: "data-product" });
2551
2931
  };
2552
2932
  var rmDataProduct = (directory) => async (path8) => {
2553
- await fs15.rm(join16(directory, path8), { recursive: true });
2933
+ await fs16.rm(join17(directory, path8), { recursive: true });
2554
2934
  invalidateFileCache();
2555
2935
  };
2556
2936
  var rmDataProductById = (directory) => async (id, version, persistFiles) => {
@@ -2564,8 +2944,8 @@ var dataProductHasVersion = (directory) => async (id, version) => {
2564
2944
  var addFileToDataProduct = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version);
2565
2945
 
2566
2946
  // src/diagrams.ts
2567
- import fs16 from "fs/promises";
2568
- import { join as join17 } from "path";
2947
+ import fs17 from "fs/promises";
2948
+ import { join as join18 } from "path";
2569
2949
  var getDiagram = (directory) => async (id, version) => getResource(directory, id, version, { type: "diagram" });
2570
2950
  var getDiagrams = (directory) => async (options) => getResources(directory, { type: "diagrams", latestOnly: options?.latestOnly });
2571
2951
  var writeDiagram = (directory) => async (diagram, options = {
@@ -2574,7 +2954,7 @@ var writeDiagram = (directory) => async (diagram, options = {
2574
2954
  format: "mdx"
2575
2955
  }) => writeResource(directory, { ...diagram }, { ...options, type: "diagram" });
2576
2956
  var rmDiagram = (directory) => async (path8) => {
2577
- await fs16.rm(join17(directory, path8), { recursive: true });
2957
+ await fs17.rm(join18(directory, path8), { recursive: true });
2578
2958
  invalidateFileCache();
2579
2959
  };
2580
2960
  var rmDiagramById = (directory) => async (id, version, persistFiles) => {
@@ -2596,13 +2976,13 @@ var src_default = (path8) => {
2596
2976
  * @param version - Optional id of the version to get (supports semver)
2597
2977
  * @returns Event|Undefined
2598
2978
  */
2599
- getEvent: getEvent(join18(path8)),
2979
+ getEvent: getEvent(join19(path8)),
2600
2980
  /**
2601
2981
  * Returns all events from EventCatalog
2602
2982
  * @param latestOnly - optional boolean, set to true to get only latest versions
2603
2983
  * @returns Event[]|Undefined
2604
2984
  */
2605
- getEvents: getEvents(join18(path8)),
2985
+ getEvents: getEvents(join19(path8)),
2606
2986
  /**
2607
2987
  * Adds an event to EventCatalog
2608
2988
  *
@@ -2610,7 +2990,7 @@ var src_default = (path8) => {
2610
2990
  * @param options - Optional options to write the event
2611
2991
  *
2612
2992
  */
2613
- writeEvent: writeEvent(join18(path8, "events")),
2993
+ writeEvent: writeEvent(join19(path8, "events")),
2614
2994
  /**
2615
2995
  * Adds an event to a service in EventCatalog
2616
2996
  *
@@ -2619,26 +2999,26 @@ var src_default = (path8) => {
2619
2999
  * @param options - Optional options to write the event
2620
3000
  *
2621
3001
  */
2622
- writeEventToService: writeEventToService(join18(path8)),
3002
+ writeEventToService: writeEventToService(join19(path8)),
2623
3003
  /**
2624
3004
  * Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
2625
3005
  *
2626
3006
  * @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
2627
3007
  *
2628
3008
  */
2629
- rmEvent: rmEvent(join18(path8, "events")),
3009
+ rmEvent: rmEvent(join19(path8, "events")),
2630
3010
  /**
2631
3011
  * Remove an event by an Event id
2632
3012
  *
2633
3013
  * @param id - The id of the event you want to remove
2634
3014
  *
2635
3015
  */
2636
- rmEventById: rmEventById(join18(path8)),
3016
+ rmEventById: rmEventById(join19(path8)),
2637
3017
  /**
2638
3018
  * Moves a given event id to the version directory
2639
3019
  * @param directory
2640
3020
  */
2641
- versionEvent: versionEvent(join18(path8)),
3021
+ versionEvent: versionEvent(join19(path8)),
2642
3022
  /**
2643
3023
  * Adds a file to the given event
2644
3024
  * @param id - The id of the event to add the file to
@@ -2646,7 +3026,7 @@ var src_default = (path8) => {
2646
3026
  * @param version - Optional version of the event to add the file to
2647
3027
  * @returns
2648
3028
  */
2649
- addFileToEvent: addFileToEvent(join18(path8)),
3029
+ addFileToEvent: addFileToEvent(join19(path8)),
2650
3030
  /**
2651
3031
  * Adds a schema to the given event
2652
3032
  * @param id - The id of the event to add the schema to
@@ -2654,17 +3034,17 @@ var src_default = (path8) => {
2654
3034
  * @param version - Optional version of the event to add the schema to
2655
3035
  * @returns
2656
3036
  */
2657
- addSchemaToEvent: addSchemaToEvent(join18(path8)),
3037
+ addSchemaToEvent: addSchemaToEvent(join19(path8)),
2658
3038
  /**
2659
3039
  * Check to see if an event version exists
2660
3040
  * @param id - The id of the event
2661
3041
  * @param version - The version of the event (supports semver)
2662
3042
  * @returns
2663
3043
  */
2664
- eventHasVersion: eventHasVersion(join18(path8)),
2665
- addExampleToEvent: addExampleToEvent(join18(path8)),
2666
- getExamplesFromEvent: getExamplesFromEvent(join18(path8)),
2667
- removeExampleFromEvent: removeExampleFromEvent(join18(path8)),
3044
+ eventHasVersion: eventHasVersion(join19(path8)),
3045
+ addExampleToEvent: addExampleToEvent(join19(path8)),
3046
+ getExamplesFromEvent: getExamplesFromEvent(join19(path8)),
3047
+ removeExampleFromEvent: removeExampleFromEvent(join19(path8)),
2668
3048
  /**
2669
3049
  * ================================
2670
3050
  * Commands
@@ -2676,13 +3056,13 @@ var src_default = (path8) => {
2676
3056
  * @param version - Optional id of the version to get (supports semver)
2677
3057
  * @returns Command|Undefined
2678
3058
  */
2679
- getCommand: getCommand(join18(path8)),
3059
+ getCommand: getCommand(join19(path8)),
2680
3060
  /**
2681
3061
  * Returns all commands from EventCatalog
2682
3062
  * @param latestOnly - optional boolean, set to true to get only latest versions
2683
3063
  * @returns Command[]|Undefined
2684
3064
  */
2685
- getCommands: getCommands(join18(path8)),
3065
+ getCommands: getCommands(join19(path8)),
2686
3066
  /**
2687
3067
  * Adds an command to EventCatalog
2688
3068
  *
@@ -2690,7 +3070,7 @@ var src_default = (path8) => {
2690
3070
  * @param options - Optional options to write the command
2691
3071
  *
2692
3072
  */
2693
- writeCommand: writeCommand(join18(path8, "commands")),
3073
+ writeCommand: writeCommand(join19(path8, "commands")),
2694
3074
  /**
2695
3075
  * Adds a command to a service in EventCatalog
2696
3076
  *
@@ -2699,26 +3079,26 @@ var src_default = (path8) => {
2699
3079
  * @param options - Optional options to write the command
2700
3080
  *
2701
3081
  */
2702
- writeCommandToService: writeCommandToService(join18(path8)),
3082
+ writeCommandToService: writeCommandToService(join19(path8)),
2703
3083
  /**
2704
3084
  * Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
2705
3085
  *
2706
3086
  * @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
2707
3087
  *
2708
3088
  */
2709
- rmCommand: rmCommand(join18(path8, "commands")),
3089
+ rmCommand: rmCommand(join19(path8, "commands")),
2710
3090
  /**
2711
3091
  * Remove an command by an Event id
2712
3092
  *
2713
3093
  * @param id - The id of the command you want to remove
2714
3094
  *
2715
3095
  */
2716
- rmCommandById: rmCommandById(join18(path8)),
3096
+ rmCommandById: rmCommandById(join19(path8)),
2717
3097
  /**
2718
3098
  * Moves a given command id to the version directory
2719
3099
  * @param directory
2720
3100
  */
2721
- versionCommand: versionCommand(join18(path8)),
3101
+ versionCommand: versionCommand(join19(path8)),
2722
3102
  /**
2723
3103
  * Adds a file to the given command
2724
3104
  * @param id - The id of the command to add the file to
@@ -2726,7 +3106,7 @@ var src_default = (path8) => {
2726
3106
  * @param version - Optional version of the command to add the file to
2727
3107
  * @returns
2728
3108
  */
2729
- addFileToCommand: addFileToCommand(join18(path8)),
3109
+ addFileToCommand: addFileToCommand(join19(path8)),
2730
3110
  /**
2731
3111
  * Adds a schema to the given command
2732
3112
  * @param id - The id of the command to add the schema to
@@ -2734,17 +3114,17 @@ var src_default = (path8) => {
2734
3114
  * @param version - Optional version of the command to add the schema to
2735
3115
  * @returns
2736
3116
  */
2737
- addSchemaToCommand: addSchemaToCommand(join18(path8)),
3117
+ addSchemaToCommand: addSchemaToCommand(join19(path8)),
2738
3118
  /**
2739
3119
  * Check to see if a command version exists
2740
3120
  * @param id - The id of the command
2741
3121
  * @param version - The version of the command (supports semver)
2742
3122
  * @returns
2743
3123
  */
2744
- commandHasVersion: commandHasVersion(join18(path8)),
2745
- addExampleToCommand: addExampleToCommand(join18(path8)),
2746
- getExamplesFromCommand: getExamplesFromCommand(join18(path8)),
2747
- removeExampleFromCommand: removeExampleFromCommand(join18(path8)),
3124
+ commandHasVersion: commandHasVersion(join19(path8)),
3125
+ addExampleToCommand: addExampleToCommand(join19(path8)),
3126
+ getExamplesFromCommand: getExamplesFromCommand(join19(path8)),
3127
+ removeExampleFromCommand: removeExampleFromCommand(join19(path8)),
2748
3128
  /**
2749
3129
  * ================================
2750
3130
  * Queries
@@ -2756,13 +3136,13 @@ var src_default = (path8) => {
2756
3136
  * @param version - Optional id of the version to get (supports semver)
2757
3137
  * @returns Query|Undefined
2758
3138
  */
2759
- getQuery: getQuery(join18(path8)),
3139
+ getQuery: getQuery(join19(path8)),
2760
3140
  /**
2761
3141
  * Returns all queries from EventCatalog
2762
3142
  * @param latestOnly - optional boolean, set to true to get only latest versions
2763
3143
  * @returns Query[]|Undefined
2764
3144
  */
2765
- getQueries: getQueries(join18(path8)),
3145
+ getQueries: getQueries(join19(path8)),
2766
3146
  /**
2767
3147
  * Adds a query to EventCatalog
2768
3148
  *
@@ -2770,7 +3150,7 @@ var src_default = (path8) => {
2770
3150
  * @param options - Optional options to write the event
2771
3151
  *
2772
3152
  */
2773
- writeQuery: writeQuery(join18(path8, "queries")),
3153
+ writeQuery: writeQuery(join19(path8, "queries")),
2774
3154
  /**
2775
3155
  * Adds a query to a service in EventCatalog
2776
3156
  *
@@ -2779,26 +3159,26 @@ var src_default = (path8) => {
2779
3159
  * @param options - Optional options to write the query
2780
3160
  *
2781
3161
  */
2782
- writeQueryToService: writeQueryToService(join18(path8)),
3162
+ writeQueryToService: writeQueryToService(join19(path8)),
2783
3163
  /**
2784
3164
  * Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
2785
3165
  *
2786
3166
  * @param path - The path to your query, e.g. `/Orders/GetOrder`
2787
3167
  *
2788
3168
  */
2789
- rmQuery: rmQuery(join18(path8, "queries")),
3169
+ rmQuery: rmQuery(join19(path8, "queries")),
2790
3170
  /**
2791
3171
  * Remove a query by a Query id
2792
3172
  *
2793
3173
  * @param id - The id of the query you want to remove
2794
3174
  *
2795
3175
  */
2796
- rmQueryById: rmQueryById(join18(path8)),
3176
+ rmQueryById: rmQueryById(join19(path8)),
2797
3177
  /**
2798
3178
  * Moves a given query id to the version directory
2799
3179
  * @param directory
2800
3180
  */
2801
- versionQuery: versionQuery(join18(path8)),
3181
+ versionQuery: versionQuery(join19(path8)),
2802
3182
  /**
2803
3183
  * Adds a file to the given query
2804
3184
  * @param id - The id of the query to add the file to
@@ -2806,7 +3186,7 @@ var src_default = (path8) => {
2806
3186
  * @param version - Optional version of the query to add the file to
2807
3187
  * @returns
2808
3188
  */
2809
- addFileToQuery: addFileToQuery(join18(path8)),
3189
+ addFileToQuery: addFileToQuery(join19(path8)),
2810
3190
  /**
2811
3191
  * Adds a schema to the given query
2812
3192
  * @param id - The id of the query to add the schema to
@@ -2814,17 +3194,17 @@ var src_default = (path8) => {
2814
3194
  * @param version - Optional version of the query to add the schema to
2815
3195
  * @returns
2816
3196
  */
2817
- addSchemaToQuery: addSchemaToQuery(join18(path8)),
3197
+ addSchemaToQuery: addSchemaToQuery(join19(path8)),
2818
3198
  /**
2819
3199
  * Check to see if an query version exists
2820
3200
  * @param id - The id of the query
2821
3201
  * @param version - The version of the query (supports semver)
2822
3202
  * @returns
2823
3203
  */
2824
- queryHasVersion: queryHasVersion(join18(path8)),
2825
- addExampleToQuery: addExampleToQuery(join18(path8)),
2826
- getExamplesFromQuery: getExamplesFromQuery(join18(path8)),
2827
- removeExampleFromQuery: removeExampleFromQuery(join18(path8)),
3204
+ queryHasVersion: queryHasVersion(join19(path8)),
3205
+ addExampleToQuery: addExampleToQuery(join19(path8)),
3206
+ getExamplesFromQuery: getExamplesFromQuery(join19(path8)),
3207
+ removeExampleFromQuery: removeExampleFromQuery(join19(path8)),
2828
3208
  /**
2829
3209
  * ================================
2830
3210
  * Channels
@@ -2836,13 +3216,13 @@ var src_default = (path8) => {
2836
3216
  * @param version - Optional id of the version to get (supports semver)
2837
3217
  * @returns Channel|Undefined
2838
3218
  */
2839
- getChannel: getChannel(join18(path8)),
3219
+ getChannel: getChannel(join19(path8)),
2840
3220
  /**
2841
3221
  * Returns all channels from EventCatalog
2842
3222
  * @param latestOnly - optional boolean, set to true to get only latest versions
2843
3223
  * @returns Channel[]|Undefined
2844
3224
  */
2845
- getChannels: getChannels(join18(path8)),
3225
+ getChannels: getChannels(join19(path8)),
2846
3226
  /**
2847
3227
  * Adds an channel to EventCatalog
2848
3228
  *
@@ -2850,33 +3230,33 @@ var src_default = (path8) => {
2850
3230
  * @param options - Optional options to write the channel
2851
3231
  *
2852
3232
  */
2853
- writeChannel: writeChannel(join18(path8, "channels")),
3233
+ writeChannel: writeChannel(join19(path8, "channels")),
2854
3234
  /**
2855
3235
  * Remove an channel to EventCatalog (modeled on the standard POSIX rm utility)
2856
3236
  *
2857
3237
  * @param path - The path to your channel, e.g. `/Inventory/InventoryAdjusted`
2858
3238
  *
2859
3239
  */
2860
- rmChannel: rmChannel(join18(path8, "channels")),
3240
+ rmChannel: rmChannel(join19(path8, "channels")),
2861
3241
  /**
2862
3242
  * Remove an channel by an Event id
2863
3243
  *
2864
3244
  * @param id - The id of the channel you want to remove
2865
3245
  *
2866
3246
  */
2867
- rmChannelById: rmChannelById(join18(path8)),
3247
+ rmChannelById: rmChannelById(join19(path8)),
2868
3248
  /**
2869
3249
  * Moves a given channel id to the version directory
2870
3250
  * @param directory
2871
3251
  */
2872
- versionChannel: versionChannel(join18(path8)),
3252
+ versionChannel: versionChannel(join19(path8)),
2873
3253
  /**
2874
3254
  * Check to see if a channel version exists
2875
3255
  * @param id - The id of the channel
2876
3256
  * @param version - The version of the channel (supports semver)
2877
3257
  * @returns
2878
3258
  */
2879
- channelHasVersion: channelHasVersion(join18(path8)),
3259
+ channelHasVersion: channelHasVersion(join19(path8)),
2880
3260
  /**
2881
3261
  * Add a channel to an event
2882
3262
  *
@@ -2893,7 +3273,7 @@ var src_default = (path8) => {
2893
3273
  *
2894
3274
  * ```
2895
3275
  */
2896
- addEventToChannel: addMessageToChannel(join18(path8), "events"),
3276
+ addEventToChannel: addMessageToChannel(join19(path8), "events"),
2897
3277
  /**
2898
3278
  * Add a channel to an command
2899
3279
  *
@@ -2910,7 +3290,7 @@ var src_default = (path8) => {
2910
3290
  *
2911
3291
  * ```
2912
3292
  */
2913
- addCommandToChannel: addMessageToChannel(join18(path8), "commands"),
3293
+ addCommandToChannel: addMessageToChannel(join19(path8), "commands"),
2914
3294
  /**
2915
3295
  * Add a channel to an query
2916
3296
  *
@@ -2927,7 +3307,7 @@ var src_default = (path8) => {
2927
3307
  *
2928
3308
  * ```
2929
3309
  */
2930
- addQueryToChannel: addMessageToChannel(join18(path8), "queries"),
3310
+ addQueryToChannel: addMessageToChannel(join19(path8), "queries"),
2931
3311
  /**
2932
3312
  * ================================
2933
3313
  * SERVICES
@@ -2940,14 +3320,14 @@ var src_default = (path8) => {
2940
3320
  * @param options - Optional options to write the event
2941
3321
  *
2942
3322
  */
2943
- writeService: writeService(join18(path8, "services")),
3323
+ writeService: writeService(join19(path8, "services")),
2944
3324
  /**
2945
3325
  * Adds a versioned service to EventCatalog
2946
3326
  *
2947
3327
  * @param service - The service to write
2948
3328
  *
2949
3329
  */
2950
- writeVersionedService: writeVersionedService(join18(path8, "services")),
3330
+ writeVersionedService: writeVersionedService(join19(path8, "services")),
2951
3331
  /**
2952
3332
  * Adds a service to a domain in EventCatalog
2953
3333
  *
@@ -2956,45 +3336,45 @@ var src_default = (path8) => {
2956
3336
  * @param options - Optional options to write the event
2957
3337
  *
2958
3338
  */
2959
- writeServiceToDomain: writeServiceToDomain(join18(path8, "domains")),
3339
+ writeServiceToDomain: writeServiceToDomain(join19(path8, "domains")),
2960
3340
  /**
2961
3341
  * Returns a service from EventCatalog
2962
3342
  * @param id - The id of the service to retrieve
2963
3343
  * @param version - Optional id of the version to get (supports semver)
2964
3344
  * @returns Service|Undefined
2965
3345
  */
2966
- getService: getService(join18(path8)),
3346
+ getService: getService(join19(path8)),
2967
3347
  /**
2968
3348
  * Returns a service from EventCatalog by it's path.
2969
3349
  * @param path - The path to the service to retrieve
2970
3350
  * @returns Service|Undefined
2971
3351
  */
2972
- getServiceByPath: getServiceByPath(join18(path8)),
3352
+ getServiceByPath: getServiceByPath(join19(path8)),
2973
3353
  /**
2974
3354
  * Returns all services from EventCatalog
2975
3355
  * @param latestOnly - optional boolean, set to true to get only latest versions
2976
3356
  * @returns Service[]|Undefined
2977
3357
  */
2978
- getServices: getServices(join18(path8)),
3358
+ getServices: getServices(join19(path8)),
2979
3359
  /**
2980
3360
  * Moves a given service id to the version directory
2981
3361
  * @param directory
2982
3362
  */
2983
- versionService: versionService(join18(path8)),
3363
+ versionService: versionService(join19(path8)),
2984
3364
  /**
2985
3365
  * Remove a service from EventCatalog (modeled on the standard POSIX rm utility)
2986
3366
  *
2987
3367
  * @param path - The path to your service, e.g. `/InventoryService`
2988
3368
  *
2989
3369
  */
2990
- rmService: rmService(join18(path8, "services")),
3370
+ rmService: rmService(join19(path8, "services")),
2991
3371
  /**
2992
3372
  * Remove an service by an service id
2993
3373
  *
2994
3374
  * @param id - The id of the service you want to remove
2995
3375
  *
2996
3376
  */
2997
- rmServiceById: rmServiceById(join18(path8)),
3377
+ rmServiceById: rmServiceById(join19(path8)),
2998
3378
  /**
2999
3379
  * Adds a file to the given service
3000
3380
  * @param id - The id of the service to add the file to
@@ -3002,21 +3382,21 @@ var src_default = (path8) => {
3002
3382
  * @param version - Optional version of the service to add the file to
3003
3383
  * @returns
3004
3384
  */
3005
- addFileToService: addFileToService(join18(path8)),
3385
+ addFileToService: addFileToService(join19(path8)),
3006
3386
  /**
3007
3387
  * Returns the specifications for a given service
3008
3388
  * @param id - The id of the service to retrieve the specifications for
3009
3389
  * @param version - Optional version of the service
3010
3390
  * @returns
3011
3391
  */
3012
- getSpecificationFilesForService: getSpecificationFilesForService(join18(path8)),
3392
+ getSpecificationFilesForService: getSpecificationFilesForService(join19(path8)),
3013
3393
  /**
3014
3394
  * Check to see if a service version exists
3015
3395
  * @param id - The id of the service
3016
3396
  * @param version - The version of the service (supports semver)
3017
3397
  * @returns
3018
3398
  */
3019
- serviceHasVersion: serviceHasVersion(join18(path8)),
3399
+ serviceHasVersion: serviceHasVersion(join19(path8)),
3020
3400
  /**
3021
3401
  * Add an event to a service by it's id.
3022
3402
  *
@@ -3036,7 +3416,7 @@ var src_default = (path8) => {
3036
3416
  *
3037
3417
  * ```
3038
3418
  */
3039
- addEventToService: addMessageToService(join18(path8)),
3419
+ addEventToService: addMessageToService(join19(path8)),
3040
3420
  /**
3041
3421
  * Add a data store to a service by it's id.
3042
3422
  *
@@ -3053,7 +3433,7 @@ var src_default = (path8) => {
3053
3433
  *
3054
3434
  * ```
3055
3435
  */
3056
- addDataStoreToService: addDataStoreToService(join18(path8)),
3436
+ addDataStoreToService: addDataStoreToService(join19(path8)),
3057
3437
  /**
3058
3438
  * Add a command to a service by it's id.
3059
3439
  *
@@ -3073,7 +3453,7 @@ var src_default = (path8) => {
3073
3453
  *
3074
3454
  * ```
3075
3455
  */
3076
- addCommandToService: addMessageToService(join18(path8)),
3456
+ addCommandToService: addMessageToService(join19(path8)),
3077
3457
  /**
3078
3458
  * Add a query to a service by it's id.
3079
3459
  *
@@ -3093,7 +3473,7 @@ var src_default = (path8) => {
3093
3473
  *
3094
3474
  * ```
3095
3475
  */
3096
- addQueryToService: addMessageToService(join18(path8)),
3476
+ addQueryToService: addMessageToService(join19(path8)),
3097
3477
  /**
3098
3478
  * Add an entity to a service by its id.
3099
3479
  *
@@ -3111,7 +3491,7 @@ var src_default = (path8) => {
3111
3491
  *
3112
3492
  * ```
3113
3493
  */
3114
- addEntityToService: addEntityToService(join18(path8)),
3494
+ addEntityToService: addEntityToService(join19(path8)),
3115
3495
  /**
3116
3496
  * Check to see if a service exists by it's path.
3117
3497
  *
@@ -3128,13 +3508,13 @@ var src_default = (path8) => {
3128
3508
  * @param path - The path to the service to check
3129
3509
  * @returns boolean
3130
3510
  */
3131
- isService: isService(join18(path8)),
3511
+ isService: isService(join19(path8)),
3132
3512
  /**
3133
3513
  * Converts a file to a service.
3134
3514
  * @param file - The file to convert to a service.
3135
3515
  * @returns The service.
3136
3516
  */
3137
- toService: toService(join18(path8)),
3517
+ toService: toService(join19(path8)),
3138
3518
  /**
3139
3519
  * ================================
3140
3520
  * Domains
@@ -3147,39 +3527,39 @@ var src_default = (path8) => {
3147
3527
  * @param options - Optional options to write the event
3148
3528
  *
3149
3529
  */
3150
- writeDomain: writeDomain(join18(path8, "domains")),
3530
+ writeDomain: writeDomain(join19(path8, "domains")),
3151
3531
  /**
3152
3532
  * Returns a domain from EventCatalog
3153
3533
  * @param id - The id of the domain to retrieve
3154
3534
  * @param version - Optional id of the version to get (supports semver)
3155
3535
  * @returns Domain|Undefined
3156
3536
  */
3157
- getDomain: getDomain(join18(path8, "domains")),
3537
+ getDomain: getDomain(join19(path8, "domains")),
3158
3538
  /**
3159
3539
  * Returns all domains from EventCatalog
3160
3540
  * @param latestOnly - optional boolean, set to true to get only latest versions
3161
3541
  * @returns Domain[]|Undefined
3162
3542
  */
3163
- getDomains: getDomains(join18(path8)),
3543
+ getDomains: getDomains(join19(path8)),
3164
3544
  /**
3165
3545
  * Moves a given domain id to the version directory
3166
3546
  * @param directory
3167
3547
  */
3168
- versionDomain: versionDomain(join18(path8, "domains")),
3548
+ versionDomain: versionDomain(join19(path8, "domains")),
3169
3549
  /**
3170
3550
  * Remove a domain from EventCatalog (modeled on the standard POSIX rm utility)
3171
3551
  *
3172
3552
  * @param path - The path to your domain, e.g. `/Payment`
3173
3553
  *
3174
3554
  */
3175
- rmDomain: rmDomain(join18(path8, "domains")),
3555
+ rmDomain: rmDomain(join19(path8, "domains")),
3176
3556
  /**
3177
3557
  * Remove an service by an domain id
3178
3558
  *
3179
3559
  * @param id - The id of the domain you want to remove
3180
3560
  *
3181
3561
  */
3182
- rmDomainById: rmDomainById(join18(path8, "domains")),
3562
+ rmDomainById: rmDomainById(join19(path8, "domains")),
3183
3563
  /**
3184
3564
  * Adds a file to the given domain
3185
3565
  * @param id - The id of the domain to add the file to
@@ -3187,28 +3567,28 @@ var src_default = (path8) => {
3187
3567
  * @param version - Optional version of the domain to add the file to
3188
3568
  * @returns
3189
3569
  */
3190
- addFileToDomain: addFileToDomain(join18(path8, "domains")),
3570
+ addFileToDomain: addFileToDomain(join19(path8, "domains")),
3191
3571
  /**
3192
3572
  * Adds an ubiquitous language dictionary to a domain
3193
3573
  * @param id - The id of the domain to add the ubiquitous language to
3194
3574
  * @param ubiquitousLanguageDictionary - The ubiquitous language dictionary to add
3195
3575
  * @param version - Optional version of the domain to add the ubiquitous language to
3196
3576
  */
3197
- addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain(join18(path8, "domains")),
3577
+ addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain(join19(path8, "domains")),
3198
3578
  /**
3199
3579
  * Get the ubiquitous language dictionary from a domain
3200
3580
  * @param id - The id of the domain to get the ubiquitous language from
3201
3581
  * @param version - Optional version of the domain to get the ubiquitous language from
3202
3582
  * @returns
3203
3583
  */
3204
- getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain(join18(path8, "domains")),
3584
+ getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain(join19(path8, "domains")),
3205
3585
  /**
3206
3586
  * Check to see if a domain version exists
3207
3587
  * @param id - The id of the domain
3208
3588
  * @param version - The version of the domain (supports semver)
3209
3589
  * @returns
3210
3590
  */
3211
- domainHasVersion: domainHasVersion(join18(path8)),
3591
+ domainHasVersion: domainHasVersion(join19(path8)),
3212
3592
  /**
3213
3593
  * Adds a given service to a domain
3214
3594
  * @param id - The id of the domain
@@ -3216,7 +3596,7 @@ var src_default = (path8) => {
3216
3596
  * @param version - (Optional) The version of the domain to add the service to
3217
3597
  * @returns
3218
3598
  */
3219
- addServiceToDomain: addServiceToDomain(join18(path8, "domains")),
3599
+ addServiceToDomain: addServiceToDomain(join19(path8, "domains")),
3220
3600
  /**
3221
3601
  * Adds a given subdomain to a domain
3222
3602
  * @param id - The id of the domain
@@ -3224,7 +3604,7 @@ var src_default = (path8) => {
3224
3604
  * @param version - (Optional) The version of the domain to add the subdomain to
3225
3605
  * @returns
3226
3606
  */
3227
- addSubDomainToDomain: addSubDomainToDomain(join18(path8, "domains")),
3607
+ addSubDomainToDomain: addSubDomainToDomain(join19(path8, "domains")),
3228
3608
  /**
3229
3609
  * Adds an entity to a domain
3230
3610
  * @param id - The id of the domain
@@ -3232,7 +3612,7 @@ var src_default = (path8) => {
3232
3612
  * @param version - (Optional) The version of the domain to add the entity to
3233
3613
  * @returns
3234
3614
  */
3235
- addEntityToDomain: addEntityToDomain(join18(path8, "domains")),
3615
+ addEntityToDomain: addEntityToDomain(join19(path8, "domains")),
3236
3616
  /**
3237
3617
  * Add an event to a domain by its id.
3238
3618
  *
@@ -3250,7 +3630,7 @@ var src_default = (path8) => {
3250
3630
  *
3251
3631
  * ```
3252
3632
  */
3253
- addEventToDomain: addMessageToDomain(join18(path8, "domains")),
3633
+ addEventToDomain: addMessageToDomain(join19(path8, "domains")),
3254
3634
  /**
3255
3635
  * Add a command to a domain by its id.
3256
3636
  *
@@ -3268,7 +3648,7 @@ var src_default = (path8) => {
3268
3648
  *
3269
3649
  * ```
3270
3650
  */
3271
- addCommandToDomain: addMessageToDomain(join18(path8, "domains")),
3651
+ addCommandToDomain: addMessageToDomain(join19(path8, "domains")),
3272
3652
  /**
3273
3653
  * Add a query to a domain by its id.
3274
3654
  *
@@ -3286,7 +3666,7 @@ var src_default = (path8) => {
3286
3666
  *
3287
3667
  * ```
3288
3668
  */
3289
- addQueryToDomain: addMessageToDomain(join18(path8, "domains")),
3669
+ addQueryToDomain: addMessageToDomain(join19(path8, "domains")),
3290
3670
  /**
3291
3671
  * ================================
3292
3672
  * Teams
@@ -3299,25 +3679,25 @@ var src_default = (path8) => {
3299
3679
  * @param options - Optional options to write the team
3300
3680
  *
3301
3681
  */
3302
- writeTeam: writeTeam(join18(path8, "teams")),
3682
+ writeTeam: writeTeam(join19(path8, "teams")),
3303
3683
  /**
3304
3684
  * Returns a team from EventCatalog
3305
3685
  * @param id - The id of the team to retrieve
3306
3686
  * @returns Team|Undefined
3307
3687
  */
3308
- getTeam: getTeam(join18(path8, "teams")),
3688
+ getTeam: getTeam(join19(path8, "teams")),
3309
3689
  /**
3310
3690
  * Returns all teams from EventCatalog
3311
3691
  * @returns Team[]|Undefined
3312
3692
  */
3313
- getTeams: getTeams(join18(path8, "teams")),
3693
+ getTeams: getTeams(join19(path8, "teams")),
3314
3694
  /**
3315
3695
  * Remove a team by the team id
3316
3696
  *
3317
3697
  * @param id - The id of the team you want to remove
3318
3698
  *
3319
3699
  */
3320
- rmTeamById: rmTeamById(join18(path8, "teams")),
3700
+ rmTeamById: rmTeamById(join19(path8, "teams")),
3321
3701
  /**
3322
3702
  * ================================
3323
3703
  * Users
@@ -3330,25 +3710,25 @@ var src_default = (path8) => {
3330
3710
  * @param options - Optional options to write the user
3331
3711
  *
3332
3712
  */
3333
- writeUser: writeUser(join18(path8, "users")),
3713
+ writeUser: writeUser(join19(path8, "users")),
3334
3714
  /**
3335
3715
  * Returns a user from EventCatalog
3336
3716
  * @param id - The id of the user to retrieve
3337
3717
  * @returns User|Undefined
3338
3718
  */
3339
- getUser: getUser(join18(path8, "users")),
3719
+ getUser: getUser(join19(path8, "users")),
3340
3720
  /**
3341
3721
  * Returns all user from EventCatalog
3342
3722
  * @returns User[]|Undefined
3343
3723
  */
3344
- getUsers: getUsers(join18(path8)),
3724
+ getUsers: getUsers(join19(path8)),
3345
3725
  /**
3346
3726
  * Remove a user by the user id
3347
3727
  *
3348
3728
  * @param id - The id of the user you want to remove
3349
3729
  *
3350
3730
  */
3351
- rmUserById: rmUserById(join18(path8, "users")),
3731
+ rmUserById: rmUserById(join19(path8, "users")),
3352
3732
  /**
3353
3733
  * ================================
3354
3734
  * Custom Docs
@@ -3359,32 +3739,32 @@ var src_default = (path8) => {
3359
3739
  * @param path - The path to the custom doc to retrieve
3360
3740
  * @returns CustomDoc|Undefined
3361
3741
  */
3362
- getCustomDoc: getCustomDoc(join18(path8, "docs")),
3742
+ getCustomDoc: getCustomDoc(join19(path8, "docs")),
3363
3743
  /**
3364
3744
  * Returns all custom docs from EventCatalog
3365
3745
  * @param options - Optional options to get custom docs from a specific path
3366
3746
  * @returns CustomDoc[]|Undefined
3367
3747
  */
3368
- getCustomDocs: getCustomDocs(join18(path8, "docs")),
3748
+ getCustomDocs: getCustomDocs(join19(path8, "docs")),
3369
3749
  /**
3370
3750
  * Writes a custom doc to EventCatalog
3371
3751
  * @param customDoc - The custom doc to write
3372
3752
  * @param options - Optional options to write the custom doc
3373
3753
  *
3374
3754
  */
3375
- writeCustomDoc: writeCustomDoc(join18(path8, "docs")),
3755
+ writeCustomDoc: writeCustomDoc(join19(path8, "docs")),
3376
3756
  /**
3377
3757
  * Removes a custom doc from EventCatalog
3378
3758
  * @param path - The path to the custom doc to remove
3379
3759
  *
3380
3760
  */
3381
- rmCustomDoc: rmCustomDoc(join18(path8, "docs")),
3761
+ rmCustomDoc: rmCustomDoc(join19(path8, "docs")),
3382
3762
  /**
3383
3763
  * Dumps the catalog to a JSON file.
3384
3764
  * @param directory - The directory to dump the catalog to
3385
3765
  * @returns A JSON file with the catalog
3386
3766
  */
3387
- dumpCatalog: dumpCatalog(join18(path8)),
3767
+ dumpCatalog: dumpCatalog(join19(path8)),
3388
3768
  /**
3389
3769
  * Returns the event catalog configuration file.
3390
3770
  * The event catalog configuration file is the file that contains the configuration for the event catalog.
@@ -3392,7 +3772,7 @@ var src_default = (path8) => {
3392
3772
  * @param directory - The directory of the catalog.
3393
3773
  * @returns A JSON object with the configuration for the event catalog.
3394
3774
  */
3395
- getEventCatalogConfigurationFile: getEventCatalogConfigurationFile(join18(path8)),
3775
+ getEventCatalogConfigurationFile: getEventCatalogConfigurationFile(join19(path8)),
3396
3776
  /**
3397
3777
  * ================================
3398
3778
  * Changelogs
@@ -3406,7 +3786,7 @@ var src_default = (path8) => {
3406
3786
  * @param options - Optional options (version, format)
3407
3787
  *
3408
3788
  */
3409
- writeChangelog: writeChangelog(join18(path8)),
3789
+ writeChangelog: writeChangelog(join19(path8)),
3410
3790
  /**
3411
3791
  * Appends a changelog entry to an existing changelog for a resource.
3412
3792
  * If no changelog exists, one is created.
@@ -3416,7 +3796,7 @@ var src_default = (path8) => {
3416
3796
  * @param options - Optional options (version, format)
3417
3797
  *
3418
3798
  */
3419
- appendChangelog: appendChangelog(join18(path8)),
3799
+ appendChangelog: appendChangelog(join19(path8)),
3420
3800
  /**
3421
3801
  * Returns the changelog for a resource in EventCatalog
3422
3802
  *
@@ -3424,7 +3804,7 @@ var src_default = (path8) => {
3424
3804
  * @param options - Optional options (version)
3425
3805
  * @returns Changelog|Undefined
3426
3806
  */
3427
- getChangelog: getChangelog(join18(path8)),
3807
+ getChangelog: getChangelog(join19(path8)),
3428
3808
  /**
3429
3809
  * Removes the changelog for a resource in EventCatalog
3430
3810
  *
@@ -3432,7 +3812,7 @@ var src_default = (path8) => {
3432
3812
  * @param options - Optional options (version)
3433
3813
  *
3434
3814
  */
3435
- rmChangelog: rmChangelog(join18(path8)),
3815
+ rmChangelog: rmChangelog(join19(path8)),
3436
3816
  /**
3437
3817
  * ================================
3438
3818
  * Resources Utils
@@ -3457,26 +3837,26 @@ var src_default = (path8) => {
3457
3837
  * @param path - The path to the message to retrieve
3458
3838
  * @returns Message|Undefined
3459
3839
  */
3460
- getMessageBySchemaPath: getMessageBySchemaPath(join18(path8)),
3840
+ getMessageBySchemaPath: getMessageBySchemaPath(join19(path8)),
3461
3841
  /**
3462
3842
  * Returns the producers and consumers (services) for a given message
3463
3843
  * @param id - The id of the message to get the producers and consumers for
3464
3844
  * @param version - Optional version of the message
3465
3845
  * @returns { producers: Service[], consumers: Service[] }
3466
3846
  */
3467
- getProducersAndConsumersForMessage: getProducersAndConsumersForMessage(join18(path8)),
3847
+ getProducersAndConsumersForMessage: getProducersAndConsumersForMessage(join19(path8)),
3468
3848
  /**
3469
3849
  * Returns the consumers of a given schema path
3470
3850
  * @param path - The path to the schema to get the consumers for
3471
3851
  * @returns Service[]
3472
3852
  */
3473
- getConsumersOfSchema: getConsumersOfSchema(join18(path8)),
3853
+ getConsumersOfSchema: getConsumersOfSchema(join19(path8)),
3474
3854
  /**
3475
3855
  * Returns the producers of a given schema path
3476
3856
  * @param path - The path to the schema to get the producers for
3477
3857
  * @returns Service[]
3478
3858
  */
3479
- getProducersOfSchema: getProducersOfSchema(join18(path8)),
3859
+ getProducersOfSchema: getProducersOfSchema(join19(path8)),
3480
3860
  /**
3481
3861
  * Returns the schema for a given message (event, command or query) by its id and version.
3482
3862
  * If no version is given, the latest version is used.
@@ -3484,14 +3864,14 @@ var src_default = (path8) => {
3484
3864
  * @param version - Optional version of the message
3485
3865
  * @returns { schema: string, fileName: string } | undefined
3486
3866
  */
3487
- getSchemaForMessage: getSchemaForMessage(join18(path8)),
3867
+ getSchemaForMessage: getSchemaForMessage(join19(path8)),
3488
3868
  /**
3489
3869
  * Returns the owners for a given resource (e.g domain, service, event, command, query, etc.)
3490
3870
  * @param id - The id of the resource to get the owners for
3491
3871
  * @param version - Optional version of the resource
3492
3872
  * @returns { owners: User[] }
3493
3873
  */
3494
- getOwnersForResource: getOwnersForResource(join18(path8)),
3874
+ getOwnersForResource: getOwnersForResource(join19(path8)),
3495
3875
  /**
3496
3876
  * ================================
3497
3877
  * Entities
@@ -3503,13 +3883,13 @@ var src_default = (path8) => {
3503
3883
  * @param version - Optional id of the version to get (supports semver)
3504
3884
  * @returns Entity|Undefined
3505
3885
  */
3506
- getEntity: getEntity(join18(path8)),
3886
+ getEntity: getEntity(join19(path8)),
3507
3887
  /**
3508
3888
  * Returns all entities from EventCatalog
3509
3889
  * @param latestOnly - optional boolean, set to true to get only latest versions
3510
3890
  * @returns Entity[]|Undefined
3511
3891
  */
3512
- getEntities: getEntities(join18(path8)),
3892
+ getEntities: getEntities(join19(path8)),
3513
3893
  /**
3514
3894
  * Adds an entity to EventCatalog
3515
3895
  *
@@ -3517,33 +3897,33 @@ var src_default = (path8) => {
3517
3897
  * @param options - Optional options to write the entity
3518
3898
  *
3519
3899
  */
3520
- writeEntity: writeEntity(join18(path8, "entities")),
3900
+ writeEntity: writeEntity(join19(path8, "entities")),
3521
3901
  /**
3522
3902
  * Remove an entity from EventCatalog (modeled on the standard POSIX rm utility)
3523
3903
  *
3524
3904
  * @param path - The path to your entity, e.g. `/User`
3525
3905
  *
3526
3906
  */
3527
- rmEntity: rmEntity(join18(path8, "entities")),
3907
+ rmEntity: rmEntity(join19(path8, "entities")),
3528
3908
  /**
3529
3909
  * Remove an entity by an entity id
3530
3910
  *
3531
3911
  * @param id - The id of the entity you want to remove
3532
3912
  *
3533
3913
  */
3534
- rmEntityById: rmEntityById(join18(path8)),
3914
+ rmEntityById: rmEntityById(join19(path8)),
3535
3915
  /**
3536
3916
  * Moves a given entity id to the version directory
3537
3917
  * @param id - The id of the entity to version
3538
3918
  */
3539
- versionEntity: versionEntity(join18(path8)),
3919
+ versionEntity: versionEntity(join19(path8)),
3540
3920
  /**
3541
3921
  * Check to see if an entity version exists
3542
3922
  * @param id - The id of the entity
3543
3923
  * @param version - The version of the entity (supports semver)
3544
3924
  * @returns
3545
3925
  */
3546
- entityHasVersion: entityHasVersion(join18(path8)),
3926
+ entityHasVersion: entityHasVersion(join19(path8)),
3547
3927
  /**
3548
3928
  * ================================
3549
3929
  * Flows
@@ -3556,7 +3936,7 @@ var src_default = (path8) => {
3556
3936
  * @param version - Optional version of the flow
3557
3937
  * @returns Flow
3558
3938
  */
3559
- getFlow: getFlow(join18(path8)),
3939
+ getFlow: getFlow(join19(path8)),
3560
3940
  /**
3561
3941
  * Returns all flows from EventCatalog
3562
3942
  *
@@ -3564,7 +3944,74 @@ var src_default = (path8) => {
3564
3944
  * @param latestOnly - optional boolean, set to true to get only latest versions
3565
3945
  * @returns Flow[]|Undefined
3566
3946
  */
3567
- getFlows: getFlows(join18(path8)),
3947
+ getFlows: getFlows(join19(path8)),
3948
+ /**
3949
+ * Adds a flow to EventCatalog
3950
+ *
3951
+ * @param flow - The flow to write
3952
+ * @param options - Optional options to write the flow
3953
+ *
3954
+ */
3955
+ writeFlow: writeFlow(join19(path8, "flows")),
3956
+ /**
3957
+ * Adds a versioned flow to EventCatalog
3958
+ *
3959
+ * @param flow - The flow to write
3960
+ *
3961
+ */
3962
+ writeVersionedFlow: writeVersionedFlow(join19(path8, "flows")),
3963
+ /**
3964
+ * Adds a flow to a domain in EventCatalog
3965
+ *
3966
+ * @param flow - The flow to write to the domain
3967
+ * @param domain - The domain and its id to write the flow to
3968
+ * @param options - Optional options to write the flow
3969
+ *
3970
+ */
3971
+ writeFlowToDomain: writeFlowToDomain(join19(path8, "domains")),
3972
+ /**
3973
+ * Adds a flow to a service in EventCatalog
3974
+ *
3975
+ * @param flow - The flow to write to the service
3976
+ * @param service - The service and its id to write the flow to
3977
+ * @param options - Optional options to write the flow
3978
+ *
3979
+ */
3980
+ writeFlowToService: writeFlowToService(join19(path8, "services")),
3981
+ /**
3982
+ * Remove a flow from EventCatalog (modeled on the standard POSIX rm utility)
3983
+ *
3984
+ * @param path - The path to your flow, e.g. `/PaymentFlow`
3985
+ *
3986
+ */
3987
+ rmFlow: rmFlow(join19(path8, "flows")),
3988
+ /**
3989
+ * Remove a flow by a flow id
3990
+ *
3991
+ * @param id - The id of the flow you want to remove
3992
+ *
3993
+ */
3994
+ rmFlowById: rmFlowById(join19(path8)),
3995
+ /**
3996
+ * Moves a given flow id to the version directory
3997
+ * @param id - The id of the flow to version
3998
+ */
3999
+ versionFlow: versionFlow(join19(path8)),
4000
+ /**
4001
+ * Check to see if a flow version exists
4002
+ * @param id - The id of the flow
4003
+ * @param version - The version of the flow (supports semver)
4004
+ * @returns
4005
+ */
4006
+ flowHasVersion: flowHasVersion(join19(path8)),
4007
+ /**
4008
+ * Adds a file to the given flow
4009
+ * @param id - The id of the flow to add the file to
4010
+ * @param file - File contents to add including the content and the file name
4011
+ * @param version - Optional version of the flow to add the file to
4012
+ * @returns
4013
+ */
4014
+ addFileToFlow: addFileToFlow(join19(path8)),
3568
4015
  /**
3569
4016
  * ================================
3570
4017
  * Data Stores
@@ -3576,42 +4023,42 @@ var src_default = (path8) => {
3576
4023
  * @param options - Optional options to write the data store
3577
4024
  *
3578
4025
  */
3579
- writeDataStore: writeDataStore(join18(path8, "containers")),
4026
+ writeDataStore: writeDataStore(join19(path8, "containers")),
3580
4027
  /**
3581
4028
  * Returns a data store from EventCatalog
3582
4029
  * @param id - The id of the data store to retrieve
3583
4030
  * @param version - Optional id of the version to get (supports semver)
3584
4031
  * @returns Container|Undefined
3585
4032
  */
3586
- getDataStore: getDataStore(join18(path8)),
4033
+ getDataStore: getDataStore(join19(path8)),
3587
4034
  /**
3588
4035
  * Returns all data stores from EventCatalog
3589
4036
  * @param latestOnly - optional boolean, set to true to get only latest versions
3590
4037
  * @returns Container[]|Undefined
3591
4038
  */
3592
- getDataStores: getDataStores(join18(path8)),
4039
+ getDataStores: getDataStores(join19(path8)),
3593
4040
  /**
3594
4041
  * Version a data store by its id
3595
4042
  * @param id - The id of the data store to version
3596
4043
  */
3597
- versionDataStore: versionDataStore(join18(path8, "containers")),
4044
+ versionDataStore: versionDataStore(join19(path8, "containers")),
3598
4045
  /**
3599
4046
  * Remove a data store by its path
3600
4047
  * @param path - The path to the data store to remove
3601
4048
  */
3602
- rmDataStore: rmDataStore(join18(path8, "containers")),
4049
+ rmDataStore: rmDataStore(join19(path8, "containers")),
3603
4050
  /**
3604
4051
  * Remove a data store by its id
3605
4052
  * @param id - The id of the data store to remove
3606
4053
  */
3607
- rmDataStoreById: rmDataStoreById(join18(path8)),
4054
+ rmDataStoreById: rmDataStoreById(join19(path8)),
3608
4055
  /**
3609
4056
  * Check to see if a data store version exists
3610
4057
  * @param id - The id of the data store
3611
4058
  * @param version - The version of the data store (supports semver)
3612
4059
  * @returns
3613
4060
  */
3614
- dataStoreHasVersion: dataStoreHasVersion(join18(path8)),
4061
+ dataStoreHasVersion: dataStoreHasVersion(join19(path8)),
3615
4062
  /**
3616
4063
  * Adds a file to a data store by its id
3617
4064
  * @param id - The id of the data store to add the file to
@@ -3619,14 +4066,14 @@ var src_default = (path8) => {
3619
4066
  * @param version - Optional version of the data store to add the file to
3620
4067
  * @returns
3621
4068
  */
3622
- addFileToDataStore: addFileToDataStore(join18(path8)),
4069
+ addFileToDataStore: addFileToDataStore(join19(path8)),
3623
4070
  /**
3624
4071
  * Writes a data store to a service by its id
3625
4072
  * @param dataStore - The data store to write
3626
4073
  * @param service - The service to write the data store to
3627
4074
  * @returns
3628
4075
  */
3629
- writeDataStoreToService: writeDataStoreToService(join18(path8)),
4076
+ writeDataStoreToService: writeDataStoreToService(join19(path8)),
3630
4077
  /**
3631
4078
  * ================================
3632
4079
  * Data Products
@@ -3638,7 +4085,7 @@ var src_default = (path8) => {
3638
4085
  * @param options - Optional options to write the data product
3639
4086
  *
3640
4087
  */
3641
- writeDataProduct: writeDataProduct(join18(path8, "data-products")),
4088
+ writeDataProduct: writeDataProduct(join19(path8, "data-products")),
3642
4089
  /**
3643
4090
  * Writes a data product to a domain in EventCatalog
3644
4091
  * @param dataProduct - The data product to write
@@ -3646,43 +4093,43 @@ var src_default = (path8) => {
3646
4093
  * @param options - Optional options to write the data product
3647
4094
  *
3648
4095
  */
3649
- writeDataProductToDomain: writeDataProductToDomain(join18(path8, "domains")),
4096
+ writeDataProductToDomain: writeDataProductToDomain(join19(path8, "domains")),
3650
4097
  /**
3651
4098
  * Returns a data product from EventCatalog
3652
4099
  * @param id - The id of the data product to retrieve
3653
4100
  * @param version - Optional id of the version to get (supports semver)
3654
4101
  * @returns DataProduct|Undefined
3655
4102
  */
3656
- getDataProduct: getDataProduct(join18(path8)),
4103
+ getDataProduct: getDataProduct(join19(path8)),
3657
4104
  /**
3658
4105
  * Returns all data products from EventCatalog
3659
4106
  * @param latestOnly - optional boolean, set to true to get only latest versions
3660
4107
  * @returns DataProduct[]|Undefined
3661
4108
  */
3662
- getDataProducts: getDataProducts(join18(path8)),
4109
+ getDataProducts: getDataProducts(join19(path8)),
3663
4110
  /**
3664
4111
  * Version a data product by its id
3665
4112
  * @param id - The id of the data product to version
3666
4113
  */
3667
- versionDataProduct: versionDataProduct(join18(path8)),
4114
+ versionDataProduct: versionDataProduct(join19(path8)),
3668
4115
  /**
3669
4116
  * Remove a data product by its path
3670
4117
  * @param path - The path to the data product to remove
3671
4118
  */
3672
- rmDataProduct: rmDataProduct(join18(path8, "data-products")),
4119
+ rmDataProduct: rmDataProduct(join19(path8, "data-products")),
3673
4120
  /**
3674
4121
  * Remove a data product by its id
3675
4122
  * @param id - The id of the data product to remove
3676
4123
  * @param version - Optional version of the data product to remove
3677
4124
  */
3678
- rmDataProductById: rmDataProductById(join18(path8)),
4125
+ rmDataProductById: rmDataProductById(join19(path8)),
3679
4126
  /**
3680
4127
  * Check to see if a data product version exists
3681
4128
  * @param id - The id of the data product
3682
4129
  * @param version - The version of the data product (supports semver)
3683
4130
  * @returns
3684
4131
  */
3685
- dataProductHasVersion: dataProductHasVersion(join18(path8)),
4132
+ dataProductHasVersion: dataProductHasVersion(join19(path8)),
3686
4133
  /**
3687
4134
  * Adds a file to a data product by its id
3688
4135
  * @param id - The id of the data product to add the file to
@@ -3690,7 +4137,7 @@ var src_default = (path8) => {
3690
4137
  * @param version - Optional version of the data product to add the file to
3691
4138
  * @returns
3692
4139
  */
3693
- addFileToDataProduct: addFileToDataProduct(join18(path8)),
4140
+ addFileToDataProduct: addFileToDataProduct(join19(path8)),
3694
4141
  /**
3695
4142
  * Adds a data product to a domain
3696
4143
  * @param id - The id of the domain
@@ -3698,7 +4145,7 @@ var src_default = (path8) => {
3698
4145
  * @param version - (Optional) The version of the domain to add the data product to
3699
4146
  * @returns
3700
4147
  */
3701
- addDataProductToDomain: addDataProductToDomain(join18(path8, "domains")),
4148
+ addDataProductToDomain: addDataProductToDomain(join19(path8, "domains")),
3702
4149
  /**
3703
4150
  * ================================
3704
4151
  * Diagrams
@@ -3710,13 +4157,13 @@ var src_default = (path8) => {
3710
4157
  * @param version - Optional id of the version to get (supports semver)
3711
4158
  * @returns Diagram|Undefined
3712
4159
  */
3713
- getDiagram: getDiagram(join18(path8)),
4160
+ getDiagram: getDiagram(join19(path8)),
3714
4161
  /**
3715
4162
  * Returns all diagrams from EventCatalog
3716
4163
  * @param latestOnly - optional boolean, set to true to get only latest versions
3717
4164
  * @returns Diagram[]|Undefined
3718
4165
  */
3719
- getDiagrams: getDiagrams(join18(path8)),
4166
+ getDiagrams: getDiagrams(join19(path8)),
3720
4167
  /**
3721
4168
  * Adds a diagram to EventCatalog
3722
4169
  *
@@ -3724,33 +4171,33 @@ var src_default = (path8) => {
3724
4171
  * @param options - Optional options to write the diagram
3725
4172
  *
3726
4173
  */
3727
- writeDiagram: writeDiagram(join18(path8, "diagrams")),
4174
+ writeDiagram: writeDiagram(join19(path8, "diagrams")),
3728
4175
  /**
3729
4176
  * Remove a diagram from EventCatalog (modeled on the standard POSIX rm utility)
3730
4177
  *
3731
4178
  * @param path - The path to your diagram, e.g. `/ArchitectureDiagram`
3732
4179
  *
3733
4180
  */
3734
- rmDiagram: rmDiagram(join18(path8, "diagrams")),
4181
+ rmDiagram: rmDiagram(join19(path8, "diagrams")),
3735
4182
  /**
3736
4183
  * Remove a diagram by a diagram id
3737
4184
  *
3738
4185
  * @param id - The id of the diagram you want to remove
3739
4186
  *
3740
4187
  */
3741
- rmDiagramById: rmDiagramById(join18(path8)),
4188
+ rmDiagramById: rmDiagramById(join19(path8)),
3742
4189
  /**
3743
4190
  * Moves a given diagram id to the version directory
3744
4191
  * @param id - The id of the diagram to version
3745
4192
  */
3746
- versionDiagram: versionDiagram(join18(path8)),
4193
+ versionDiagram: versionDiagram(join19(path8)),
3747
4194
  /**
3748
4195
  * Check to see if a diagram version exists
3749
4196
  * @param id - The id of the diagram
3750
4197
  * @param version - The version of the diagram (supports semver)
3751
4198
  * @returns
3752
4199
  */
3753
- diagramHasVersion: diagramHasVersion(join18(path8)),
4200
+ diagramHasVersion: diagramHasVersion(join19(path8)),
3754
4201
  /**
3755
4202
  * Adds a file to the given diagram
3756
4203
  * @param id - The id of the diagram to add the file to
@@ -3758,7 +4205,7 @@ var src_default = (path8) => {
3758
4205
  * @param version - Optional version of the diagram to add the file to
3759
4206
  * @returns
3760
4207
  */
3761
- addFileToDiagram: addFileToDiagram(join18(path8)),
4208
+ addFileToDiagram: addFileToDiagram(join19(path8)),
3762
4209
  /**
3763
4210
  * ================================
3764
4211
  * DSL
@@ -3777,25 +4224,26 @@ var src_default = (path8) => {
3777
4224
  * const dsl = await sdk.toDSL(services, { type: 'service', hydrate: true });
3778
4225
  * ```
3779
4226
  */
3780
- createSnapshot: createSnapshot(join18(path8)),
3781
- diffSnapshots: diffSnapshots(join18(path8)),
3782
- listSnapshots: listSnapshots(join18(path8)),
3783
- toDSL: toDSL(join18(path8), {
3784
- getEvent: getEvent(join18(path8)),
3785
- getCommand: getCommand(join18(path8)),
3786
- getQuery: getQuery(join18(path8)),
3787
- getService: getService(join18(path8)),
3788
- getServices: getServices(join18(path8)),
3789
- getDomain: getDomain(join18(path8, "domains")),
3790
- getChannel: getChannel(join18(path8)),
3791
- getChannels: getChannels(join18(path8)),
3792
- getContainer: getDataStore(join18(path8)),
3793
- getTeam: getTeam(join18(path8, "teams")),
3794
- getUser: getUser(join18(path8, "users"))
4227
+ createSnapshot: createSnapshot(join19(path8)),
4228
+ diffSnapshots: diffSnapshots(join19(path8)),
4229
+ listSnapshots: listSnapshots(join19(path8)),
4230
+ toDSL: toDSL(join19(path8), {
4231
+ getEvent: getEvent(join19(path8)),
4232
+ getCommand: getCommand(join19(path8)),
4233
+ getQuery: getQuery(join19(path8)),
4234
+ getService: getService(join19(path8)),
4235
+ getServices: getServices(join19(path8)),
4236
+ getDomain: getDomain(join19(path8, "domains")),
4237
+ getChannel: getChannel(join19(path8)),
4238
+ getChannels: getChannels(join19(path8)),
4239
+ getContainer: getDataStore(join19(path8)),
4240
+ getTeam: getTeam(join19(path8, "teams")),
4241
+ getUser: getUser(join19(path8, "users"))
3795
4242
  })
3796
4243
  };
3797
4244
  };
3798
4245
  export {
4246
+ FlowBuilder,
3799
4247
  src_default as default
3800
4248
  };
3801
4249
  //# sourceMappingURL=index.mjs.map