@eventcatalog/sdk 2.20.0 → 2.21.1

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