@eventcatalog/sdk 2.25.0-beta.0 → 2.25.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 join21 } from "path";
2
+ import { join as join22 } from "path";
3
3
 
4
4
  // src/dsl/utils.ts
5
5
  import { globSync } from "glob";
@@ -2353,7 +2353,8 @@ var dumpCatalog = (directory) => async (options) => {
2353
2353
  getUsers: getUsers3,
2354
2354
  getEntities: getEntities2,
2355
2355
  getDataStores: getDataStores2,
2356
- getFlows: getFlows2
2356
+ getFlows: getFlows2,
2357
+ getAdrs: getAdrs2
2357
2358
  } = src_default(directory);
2358
2359
  const { includeMarkdown = true } = options || {};
2359
2360
  const domains = await getDomains2();
@@ -2369,6 +2370,7 @@ var dumpCatalog = (directory) => async (options) => {
2369
2370
  const entities = await getEntities2();
2370
2371
  const containers = await getDataStores2();
2371
2372
  const flows = await getFlows2();
2373
+ const adrs = await getAdrs2();
2372
2374
  const [
2373
2375
  hydratedDomains,
2374
2376
  hydratedSystems,
@@ -2382,7 +2384,8 @@ var dumpCatalog = (directory) => async (options) => {
2382
2384
  hydratedChannels,
2383
2385
  hydratedEntities,
2384
2386
  hydratedContainers,
2385
- hydratedFlows
2387
+ hydratedFlows,
2388
+ hydratedAdrs
2386
2389
  ] = await Promise.all([
2387
2390
  hydrateResource(directory, domains),
2388
2391
  hydrateResource(directory, systems),
@@ -2396,7 +2399,8 @@ var dumpCatalog = (directory) => async (options) => {
2396
2399
  hydrateResource(directory, channels),
2397
2400
  hydrateResource(directory, entities),
2398
2401
  hydrateResource(directory, containers),
2399
- hydrateResource(directory, flows)
2402
+ hydrateResource(directory, flows),
2403
+ hydrateResource(directory, adrs)
2400
2404
  ]);
2401
2405
  return {
2402
2406
  version: DUMP_VERSION,
@@ -2417,7 +2421,8 @@ var dumpCatalog = (directory) => async (options) => {
2417
2421
  channels: filterCollection(hydratedChannels, { includeMarkdown }),
2418
2422
  entities: filterCollection(hydratedEntities, { includeMarkdown }),
2419
2423
  containers: filterCollection(hydratedContainers, { includeMarkdown }),
2420
- flows: filterCollection(hydratedFlows, { includeMarkdown })
2424
+ flows: filterCollection(hydratedFlows, { includeMarkdown }),
2425
+ adrs: filterCollection(hydratedAdrs, { includeMarkdown })
2421
2426
  }
2422
2427
  };
2423
2428
  };
@@ -3499,6 +3504,30 @@ var diagramHasVersion = (directory) => async (id, version) => {
3499
3504
  };
3500
3505
  var addFileToDiagram = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version, { type: "diagram" });
3501
3506
 
3507
+ // src/adrs.ts
3508
+ import fs21 from "fs/promises";
3509
+ import { join as join21 } from "path";
3510
+ var getAdr = (directory) => async (id, version) => getResource(directory, id, version, { type: "adr" });
3511
+ var getAdrs = (directory) => async (options) => getResources(directory, { type: "adrs", latestOnly: options?.latestOnly });
3512
+ var writeAdr = (directory) => async (adr, options = {
3513
+ path: "",
3514
+ override: false,
3515
+ format: "mdx"
3516
+ }) => writeResource(directory, { ...adr }, { ...options, type: "adr" });
3517
+ var rmAdr = (directory) => async (path9) => {
3518
+ await fs21.rm(join21(directory, path9), { recursive: true });
3519
+ invalidateFileCache();
3520
+ };
3521
+ var rmAdrById = (directory) => async (id, version, persistFiles) => {
3522
+ await rmResourceById(directory, id, version, { type: "adr", persistFiles });
3523
+ };
3524
+ var versionAdr = (directory) => async (id) => versionResource(directory, id);
3525
+ var adrHasVersion = (directory) => async (id, version) => {
3526
+ const file = await findFileById(directory, id, version);
3527
+ return !!file;
3528
+ };
3529
+ var addFileToAdr = (directory) => async (id, file, version) => addFileToResource(directory, id, file, version, { type: "adr" });
3530
+
3502
3531
  // src/index.ts
3503
3532
  var src_default = (path9) => {
3504
3533
  return {
@@ -3508,13 +3537,13 @@ var src_default = (path9) => {
3508
3537
  * @param version - Optional id of the version to get (supports semver)
3509
3538
  * @returns Event|Undefined
3510
3539
  */
3511
- getEvent: getEvent(join21(path9)),
3540
+ getEvent: getEvent(join22(path9)),
3512
3541
  /**
3513
3542
  * Returns all events from EventCatalog
3514
3543
  * @param latestOnly - optional boolean, set to true to get only latest versions
3515
3544
  * @returns Event[]|Undefined
3516
3545
  */
3517
- getEvents: getEvents(join21(path9)),
3546
+ getEvents: getEvents(join22(path9)),
3518
3547
  /**
3519
3548
  * Adds an event to EventCatalog
3520
3549
  *
@@ -3522,7 +3551,7 @@ var src_default = (path9) => {
3522
3551
  * @param options - Optional options to write the event
3523
3552
  *
3524
3553
  */
3525
- writeEvent: writeEvent(join21(path9, "events")),
3554
+ writeEvent: writeEvent(join22(path9, "events")),
3526
3555
  /**
3527
3556
  * Adds an event to a service in EventCatalog
3528
3557
  *
@@ -3531,7 +3560,7 @@ var src_default = (path9) => {
3531
3560
  * @param options - Optional options to write the event
3532
3561
  *
3533
3562
  */
3534
- writeEventToService: writeEventToService(join21(path9)),
3563
+ writeEventToService: writeEventToService(join22(path9)),
3535
3564
  /**
3536
3565
  * Adds an event to an agent in EventCatalog
3537
3566
  *
@@ -3540,26 +3569,26 @@ var src_default = (path9) => {
3540
3569
  * @param options - Optional options to write the event
3541
3570
  *
3542
3571
  */
3543
- writeEventToAgent: writeEventToAgent(join21(path9)),
3572
+ writeEventToAgent: writeEventToAgent(join22(path9)),
3544
3573
  /**
3545
3574
  * Remove an event to EventCatalog (modeled on the standard POSIX rm utility)
3546
3575
  *
3547
3576
  * @param path - The path to your event, e.g. `/Inventory/InventoryAdjusted`
3548
3577
  *
3549
3578
  */
3550
- rmEvent: rmEvent(join21(path9, "events")),
3579
+ rmEvent: rmEvent(join22(path9, "events")),
3551
3580
  /**
3552
3581
  * Remove an event by an Event id
3553
3582
  *
3554
3583
  * @param id - The id of the event you want to remove
3555
3584
  *
3556
3585
  */
3557
- rmEventById: rmEventById(join21(path9)),
3586
+ rmEventById: rmEventById(join22(path9)),
3558
3587
  /**
3559
3588
  * Moves a given event id to the version directory
3560
3589
  * @param directory
3561
3590
  */
3562
- versionEvent: versionEvent(join21(path9)),
3591
+ versionEvent: versionEvent(join22(path9)),
3563
3592
  /**
3564
3593
  * Adds a file to the given event
3565
3594
  * @param id - The id of the event to add the file to
@@ -3567,7 +3596,7 @@ var src_default = (path9) => {
3567
3596
  * @param version - Optional version of the event to add the file to
3568
3597
  * @returns
3569
3598
  */
3570
- addFileToEvent: addFileToEvent(join21(path9)),
3599
+ addFileToEvent: addFileToEvent(join22(path9)),
3571
3600
  /**
3572
3601
  * Adds a schema to the given event
3573
3602
  * @param id - The id of the event to add the schema to
@@ -3575,17 +3604,17 @@ var src_default = (path9) => {
3575
3604
  * @param version - Optional version of the event to add the schema to
3576
3605
  * @returns
3577
3606
  */
3578
- addSchemaToEvent: addSchemaToEvent(join21(path9)),
3607
+ addSchemaToEvent: addSchemaToEvent(join22(path9)),
3579
3608
  /**
3580
3609
  * Check to see if an event version exists
3581
3610
  * @param id - The id of the event
3582
3611
  * @param version - The version of the event (supports semver)
3583
3612
  * @returns
3584
3613
  */
3585
- eventHasVersion: eventHasVersion(join21(path9)),
3586
- addExampleToEvent: addExampleToEvent(join21(path9)),
3587
- getExamplesFromEvent: getExamplesFromEvent(join21(path9)),
3588
- removeExampleFromEvent: removeExampleFromEvent(join21(path9)),
3614
+ eventHasVersion: eventHasVersion(join22(path9)),
3615
+ addExampleToEvent: addExampleToEvent(join22(path9)),
3616
+ getExamplesFromEvent: getExamplesFromEvent(join22(path9)),
3617
+ removeExampleFromEvent: removeExampleFromEvent(join22(path9)),
3589
3618
  /**
3590
3619
  * ================================
3591
3620
  * Commands
@@ -3597,13 +3626,13 @@ var src_default = (path9) => {
3597
3626
  * @param version - Optional id of the version to get (supports semver)
3598
3627
  * @returns Command|Undefined
3599
3628
  */
3600
- getCommand: getCommand(join21(path9)),
3629
+ getCommand: getCommand(join22(path9)),
3601
3630
  /**
3602
3631
  * Returns all commands from EventCatalog
3603
3632
  * @param latestOnly - optional boolean, set to true to get only latest versions
3604
3633
  * @returns Command[]|Undefined
3605
3634
  */
3606
- getCommands: getCommands(join21(path9)),
3635
+ getCommands: getCommands(join22(path9)),
3607
3636
  /**
3608
3637
  * Adds an command to EventCatalog
3609
3638
  *
@@ -3611,7 +3640,7 @@ var src_default = (path9) => {
3611
3640
  * @param options - Optional options to write the command
3612
3641
  *
3613
3642
  */
3614
- writeCommand: writeCommand(join21(path9, "commands")),
3643
+ writeCommand: writeCommand(join22(path9, "commands")),
3615
3644
  /**
3616
3645
  * Adds a command to a service in EventCatalog
3617
3646
  *
@@ -3620,7 +3649,7 @@ var src_default = (path9) => {
3620
3649
  * @param options - Optional options to write the command
3621
3650
  *
3622
3651
  */
3623
- writeCommandToService: writeCommandToService(join21(path9)),
3652
+ writeCommandToService: writeCommandToService(join22(path9)),
3624
3653
  /**
3625
3654
  * Adds a command to an agent in EventCatalog
3626
3655
  *
@@ -3629,26 +3658,26 @@ var src_default = (path9) => {
3629
3658
  * @param options - Optional options to write the command
3630
3659
  *
3631
3660
  */
3632
- writeCommandToAgent: writeCommandToAgent(join21(path9)),
3661
+ writeCommandToAgent: writeCommandToAgent(join22(path9)),
3633
3662
  /**
3634
3663
  * Remove an command to EventCatalog (modeled on the standard POSIX rm utility)
3635
3664
  *
3636
3665
  * @param path - The path to your command, e.g. `/Inventory/InventoryAdjusted`
3637
3666
  *
3638
3667
  */
3639
- rmCommand: rmCommand(join21(path9, "commands")),
3668
+ rmCommand: rmCommand(join22(path9, "commands")),
3640
3669
  /**
3641
3670
  * Remove an command by an Event id
3642
3671
  *
3643
3672
  * @param id - The id of the command you want to remove
3644
3673
  *
3645
3674
  */
3646
- rmCommandById: rmCommandById(join21(path9)),
3675
+ rmCommandById: rmCommandById(join22(path9)),
3647
3676
  /**
3648
3677
  * Moves a given command id to the version directory
3649
3678
  * @param directory
3650
3679
  */
3651
- versionCommand: versionCommand(join21(path9)),
3680
+ versionCommand: versionCommand(join22(path9)),
3652
3681
  /**
3653
3682
  * Adds a file to the given command
3654
3683
  * @param id - The id of the command to add the file to
@@ -3656,7 +3685,7 @@ var src_default = (path9) => {
3656
3685
  * @param version - Optional version of the command to add the file to
3657
3686
  * @returns
3658
3687
  */
3659
- addFileToCommand: addFileToCommand(join21(path9)),
3688
+ addFileToCommand: addFileToCommand(join22(path9)),
3660
3689
  /**
3661
3690
  * Adds a schema to the given command
3662
3691
  * @param id - The id of the command to add the schema to
@@ -3664,17 +3693,17 @@ var src_default = (path9) => {
3664
3693
  * @param version - Optional version of the command to add the schema to
3665
3694
  * @returns
3666
3695
  */
3667
- addSchemaToCommand: addSchemaToCommand(join21(path9)),
3696
+ addSchemaToCommand: addSchemaToCommand(join22(path9)),
3668
3697
  /**
3669
3698
  * Check to see if a command version exists
3670
3699
  * @param id - The id of the command
3671
3700
  * @param version - The version of the command (supports semver)
3672
3701
  * @returns
3673
3702
  */
3674
- commandHasVersion: commandHasVersion(join21(path9)),
3675
- addExampleToCommand: addExampleToCommand(join21(path9)),
3676
- getExamplesFromCommand: getExamplesFromCommand(join21(path9)),
3677
- removeExampleFromCommand: removeExampleFromCommand(join21(path9)),
3703
+ commandHasVersion: commandHasVersion(join22(path9)),
3704
+ addExampleToCommand: addExampleToCommand(join22(path9)),
3705
+ getExamplesFromCommand: getExamplesFromCommand(join22(path9)),
3706
+ removeExampleFromCommand: removeExampleFromCommand(join22(path9)),
3678
3707
  /**
3679
3708
  * ================================
3680
3709
  * Queries
@@ -3686,13 +3715,13 @@ var src_default = (path9) => {
3686
3715
  * @param version - Optional id of the version to get (supports semver)
3687
3716
  * @returns Query|Undefined
3688
3717
  */
3689
- getQuery: getQuery(join21(path9)),
3718
+ getQuery: getQuery(join22(path9)),
3690
3719
  /**
3691
3720
  * Returns all queries from EventCatalog
3692
3721
  * @param latestOnly - optional boolean, set to true to get only latest versions
3693
3722
  * @returns Query[]|Undefined
3694
3723
  */
3695
- getQueries: getQueries(join21(path9)),
3724
+ getQueries: getQueries(join22(path9)),
3696
3725
  /**
3697
3726
  * Adds a query to EventCatalog
3698
3727
  *
@@ -3700,7 +3729,7 @@ var src_default = (path9) => {
3700
3729
  * @param options - Optional options to write the event
3701
3730
  *
3702
3731
  */
3703
- writeQuery: writeQuery(join21(path9, "queries")),
3732
+ writeQuery: writeQuery(join22(path9, "queries")),
3704
3733
  /**
3705
3734
  * Adds a query to a service in EventCatalog
3706
3735
  *
@@ -3709,7 +3738,7 @@ var src_default = (path9) => {
3709
3738
  * @param options - Optional options to write the query
3710
3739
  *
3711
3740
  */
3712
- writeQueryToService: writeQueryToService(join21(path9)),
3741
+ writeQueryToService: writeQueryToService(join22(path9)),
3713
3742
  /**
3714
3743
  * Adds a query to an agent in EventCatalog
3715
3744
  *
@@ -3718,26 +3747,26 @@ var src_default = (path9) => {
3718
3747
  * @param options - Optional options to write the query
3719
3748
  *
3720
3749
  */
3721
- writeQueryToAgent: writeQueryToAgent(join21(path9)),
3750
+ writeQueryToAgent: writeQueryToAgent(join22(path9)),
3722
3751
  /**
3723
3752
  * Remove an query to EventCatalog (modeled on the standard POSIX rm utility)
3724
3753
  *
3725
3754
  * @param path - The path to your query, e.g. `/Orders/GetOrder`
3726
3755
  *
3727
3756
  */
3728
- rmQuery: rmQuery(join21(path9, "queries")),
3757
+ rmQuery: rmQuery(join22(path9, "queries")),
3729
3758
  /**
3730
3759
  * Remove a query by a Query id
3731
3760
  *
3732
3761
  * @param id - The id of the query you want to remove
3733
3762
  *
3734
3763
  */
3735
- rmQueryById: rmQueryById(join21(path9)),
3764
+ rmQueryById: rmQueryById(join22(path9)),
3736
3765
  /**
3737
3766
  * Moves a given query id to the version directory
3738
3767
  * @param directory
3739
3768
  */
3740
- versionQuery: versionQuery(join21(path9)),
3769
+ versionQuery: versionQuery(join22(path9)),
3741
3770
  /**
3742
3771
  * Adds a file to the given query
3743
3772
  * @param id - The id of the query to add the file to
@@ -3745,7 +3774,7 @@ var src_default = (path9) => {
3745
3774
  * @param version - Optional version of the query to add the file to
3746
3775
  * @returns
3747
3776
  */
3748
- addFileToQuery: addFileToQuery(join21(path9)),
3777
+ addFileToQuery: addFileToQuery(join22(path9)),
3749
3778
  /**
3750
3779
  * Adds a schema to the given query
3751
3780
  * @param id - The id of the query to add the schema to
@@ -3753,17 +3782,17 @@ var src_default = (path9) => {
3753
3782
  * @param version - Optional version of the query to add the schema to
3754
3783
  * @returns
3755
3784
  */
3756
- addSchemaToQuery: addSchemaToQuery(join21(path9)),
3785
+ addSchemaToQuery: addSchemaToQuery(join22(path9)),
3757
3786
  /**
3758
3787
  * Check to see if an query version exists
3759
3788
  * @param id - The id of the query
3760
3789
  * @param version - The version of the query (supports semver)
3761
3790
  * @returns
3762
3791
  */
3763
- queryHasVersion: queryHasVersion(join21(path9)),
3764
- addExampleToQuery: addExampleToQuery(join21(path9)),
3765
- getExamplesFromQuery: getExamplesFromQuery(join21(path9)),
3766
- removeExampleFromQuery: removeExampleFromQuery(join21(path9)),
3792
+ queryHasVersion: queryHasVersion(join22(path9)),
3793
+ addExampleToQuery: addExampleToQuery(join22(path9)),
3794
+ getExamplesFromQuery: getExamplesFromQuery(join22(path9)),
3795
+ removeExampleFromQuery: removeExampleFromQuery(join22(path9)),
3767
3796
  /**
3768
3797
  * ================================
3769
3798
  * Channels
@@ -3775,13 +3804,13 @@ var src_default = (path9) => {
3775
3804
  * @param version - Optional id of the version to get (supports semver)
3776
3805
  * @returns Channel|Undefined
3777
3806
  */
3778
- getChannel: getChannel(join21(path9)),
3807
+ getChannel: getChannel(join22(path9)),
3779
3808
  /**
3780
3809
  * Returns all channels from EventCatalog
3781
3810
  * @param latestOnly - optional boolean, set to true to get only latest versions
3782
3811
  * @returns Channel[]|Undefined
3783
3812
  */
3784
- getChannels: getChannels(join21(path9)),
3813
+ getChannels: getChannels(join22(path9)),
3785
3814
  /**
3786
3815
  * Adds an channel to EventCatalog
3787
3816
  *
@@ -3789,33 +3818,33 @@ var src_default = (path9) => {
3789
3818
  * @param options - Optional options to write the channel
3790
3819
  *
3791
3820
  */
3792
- writeChannel: writeChannel(join21(path9, "channels")),
3821
+ writeChannel: writeChannel(join22(path9, "channels")),
3793
3822
  /**
3794
3823
  * Remove an channel to EventCatalog (modeled on the standard POSIX rm utility)
3795
3824
  *
3796
3825
  * @param path - The path to your channel, e.g. `/Inventory/InventoryAdjusted`
3797
3826
  *
3798
3827
  */
3799
- rmChannel: rmChannel(join21(path9, "channels")),
3828
+ rmChannel: rmChannel(join22(path9, "channels")),
3800
3829
  /**
3801
3830
  * Remove an channel by an Event id
3802
3831
  *
3803
3832
  * @param id - The id of the channel you want to remove
3804
3833
  *
3805
3834
  */
3806
- rmChannelById: rmChannelById(join21(path9)),
3835
+ rmChannelById: rmChannelById(join22(path9)),
3807
3836
  /**
3808
3837
  * Moves a given channel id to the version directory
3809
3838
  * @param directory
3810
3839
  */
3811
- versionChannel: versionChannel(join21(path9)),
3840
+ versionChannel: versionChannel(join22(path9)),
3812
3841
  /**
3813
3842
  * Check to see if a channel version exists
3814
3843
  * @param id - The id of the channel
3815
3844
  * @param version - The version of the channel (supports semver)
3816
3845
  * @returns
3817
3846
  */
3818
- channelHasVersion: channelHasVersion(join21(path9)),
3847
+ channelHasVersion: channelHasVersion(join22(path9)),
3819
3848
  /**
3820
3849
  * Add a channel to an event
3821
3850
  *
@@ -3832,7 +3861,7 @@ var src_default = (path9) => {
3832
3861
  *
3833
3862
  * ```
3834
3863
  */
3835
- addEventToChannel: addMessageToChannel(join21(path9), "events"),
3864
+ addEventToChannel: addMessageToChannel(join22(path9), "events"),
3836
3865
  /**
3837
3866
  * Add a channel to an command
3838
3867
  *
@@ -3849,7 +3878,7 @@ var src_default = (path9) => {
3849
3878
  *
3850
3879
  * ```
3851
3880
  */
3852
- addCommandToChannel: addMessageToChannel(join21(path9), "commands"),
3881
+ addCommandToChannel: addMessageToChannel(join22(path9), "commands"),
3853
3882
  /**
3854
3883
  * Add a channel to an query
3855
3884
  *
@@ -3866,7 +3895,7 @@ var src_default = (path9) => {
3866
3895
  *
3867
3896
  * ```
3868
3897
  */
3869
- addQueryToChannel: addMessageToChannel(join21(path9), "queries"),
3898
+ addQueryToChannel: addMessageToChannel(join22(path9), "queries"),
3870
3899
  /**
3871
3900
  * ================================
3872
3901
  * SERVICES
@@ -3879,14 +3908,14 @@ var src_default = (path9) => {
3879
3908
  * @param options - Optional options to write the event
3880
3909
  *
3881
3910
  */
3882
- writeService: writeService(join21(path9, "services")),
3911
+ writeService: writeService(join22(path9, "services")),
3883
3912
  /**
3884
3913
  * Adds a versioned service to EventCatalog
3885
3914
  *
3886
3915
  * @param service - The service to write
3887
3916
  *
3888
3917
  */
3889
- writeVersionedService: writeVersionedService(join21(path9, "services")),
3918
+ writeVersionedService: writeVersionedService(join22(path9, "services")),
3890
3919
  /**
3891
3920
  * Adds a service to a domain in EventCatalog
3892
3921
  *
@@ -3895,7 +3924,7 @@ var src_default = (path9) => {
3895
3924
  * @param options - Optional options to write the event
3896
3925
  *
3897
3926
  */
3898
- writeServiceToDomain: writeServiceToDomain(join21(path9, "domains")),
3927
+ writeServiceToDomain: writeServiceToDomain(join22(path9, "domains")),
3899
3928
  /**
3900
3929
  * Adds a service to a system in EventCatalog
3901
3930
  *
@@ -3904,45 +3933,45 @@ var src_default = (path9) => {
3904
3933
  * @param options - Optional options to write the service
3905
3934
  *
3906
3935
  */
3907
- writeServiceToSystem: writeServiceToSystem(join21(path9)),
3936
+ writeServiceToSystem: writeServiceToSystem(join22(path9)),
3908
3937
  /**
3909
3938
  * Returns a service from EventCatalog
3910
3939
  * @param id - The id of the service to retrieve
3911
3940
  * @param version - Optional id of the version to get (supports semver)
3912
3941
  * @returns Service|Undefined
3913
3942
  */
3914
- getService: getService(join21(path9)),
3943
+ getService: getService(join22(path9)),
3915
3944
  /**
3916
3945
  * Returns a service from EventCatalog by it's path.
3917
3946
  * @param path - The path to the service to retrieve
3918
3947
  * @returns Service|Undefined
3919
3948
  */
3920
- getServiceByPath: getServiceByPath(join21(path9)),
3949
+ getServiceByPath: getServiceByPath(join22(path9)),
3921
3950
  /**
3922
3951
  * Returns all services from EventCatalog
3923
3952
  * @param latestOnly - optional boolean, set to true to get only latest versions
3924
3953
  * @returns Service[]|Undefined
3925
3954
  */
3926
- getServices: getServices(join21(path9)),
3955
+ getServices: getServices(join22(path9)),
3927
3956
  /**
3928
3957
  * Moves a given service id to the version directory
3929
3958
  * @param directory
3930
3959
  */
3931
- versionService: versionService(join21(path9)),
3960
+ versionService: versionService(join22(path9)),
3932
3961
  /**
3933
3962
  * Remove a service from EventCatalog (modeled on the standard POSIX rm utility)
3934
3963
  *
3935
3964
  * @param path - The path to your service, e.g. `/InventoryService`
3936
3965
  *
3937
3966
  */
3938
- rmService: rmService(join21(path9, "services")),
3967
+ rmService: rmService(join22(path9, "services")),
3939
3968
  /**
3940
3969
  * Remove an service by an service id
3941
3970
  *
3942
3971
  * @param id - The id of the service you want to remove
3943
3972
  *
3944
3973
  */
3945
- rmServiceById: rmServiceById(join21(path9)),
3974
+ rmServiceById: rmServiceById(join22(path9)),
3946
3975
  /**
3947
3976
  * Adds a file to the given service
3948
3977
  * @param id - The id of the service to add the file to
@@ -3950,21 +3979,21 @@ var src_default = (path9) => {
3950
3979
  * @param version - Optional version of the service to add the file to
3951
3980
  * @returns
3952
3981
  */
3953
- addFileToService: addFileToService(join21(path9)),
3982
+ addFileToService: addFileToService(join22(path9)),
3954
3983
  /**
3955
3984
  * Returns the specifications for a given service
3956
3985
  * @param id - The id of the service to retrieve the specifications for
3957
3986
  * @param version - Optional version of the service
3958
3987
  * @returns
3959
3988
  */
3960
- getSpecificationFilesForService: getSpecificationFilesForService(join21(path9)),
3989
+ getSpecificationFilesForService: getSpecificationFilesForService(join22(path9)),
3961
3990
  /**
3962
3991
  * Check to see if a service version exists
3963
3992
  * @param id - The id of the service
3964
3993
  * @param version - The version of the service (supports semver)
3965
3994
  * @returns
3966
3995
  */
3967
- serviceHasVersion: serviceHasVersion(join21(path9)),
3996
+ serviceHasVersion: serviceHasVersion(join22(path9)),
3968
3997
  /**
3969
3998
  * Add an event to a service by it's id.
3970
3999
  *
@@ -3984,7 +4013,7 @@ var src_default = (path9) => {
3984
4013
  *
3985
4014
  * ```
3986
4015
  */
3987
- addEventToService: addMessageToService(join21(path9)),
4016
+ addEventToService: addMessageToService(join22(path9)),
3988
4017
  /**
3989
4018
  * Add a data store to a service by it's id.
3990
4019
  *
@@ -4001,7 +4030,7 @@ var src_default = (path9) => {
4001
4030
  *
4002
4031
  * ```
4003
4032
  */
4004
- addDataStoreToService: addDataStoreToService(join21(path9)),
4033
+ addDataStoreToService: addDataStoreToService(join22(path9)),
4005
4034
  /**
4006
4035
  * Add a command to a service by it's id.
4007
4036
  *
@@ -4021,7 +4050,7 @@ var src_default = (path9) => {
4021
4050
  *
4022
4051
  * ```
4023
4052
  */
4024
- addCommandToService: addMessageToService(join21(path9)),
4053
+ addCommandToService: addMessageToService(join22(path9)),
4025
4054
  /**
4026
4055
  * Add a query to a service by it's id.
4027
4056
  *
@@ -4041,7 +4070,7 @@ var src_default = (path9) => {
4041
4070
  *
4042
4071
  * ```
4043
4072
  */
4044
- addQueryToService: addMessageToService(join21(path9)),
4073
+ addQueryToService: addMessageToService(join22(path9)),
4045
4074
  /**
4046
4075
  * Add an entity to a service by its id.
4047
4076
  *
@@ -4059,7 +4088,7 @@ var src_default = (path9) => {
4059
4088
  *
4060
4089
  * ```
4061
4090
  */
4062
- addEntityToService: addEntityToService(join21(path9)),
4091
+ addEntityToService: addEntityToService(join22(path9)),
4063
4092
  /**
4064
4093
  * Check to see if a service exists by it's path.
4065
4094
  *
@@ -4076,57 +4105,57 @@ var src_default = (path9) => {
4076
4105
  * @param path - The path to the service to check
4077
4106
  * @returns boolean
4078
4107
  */
4079
- isService: isService(join21(path9)),
4108
+ isService: isService(join22(path9)),
4080
4109
  /**
4081
4110
  * Converts a file to a service.
4082
4111
  * @param file - The file to convert to a service.
4083
4112
  * @returns The service.
4084
4113
  */
4085
- toService: toService(join21(path9)),
4114
+ toService: toService(join22(path9)),
4086
4115
  /**
4087
4116
  * ================================
4088
4117
  * Systems
4089
4118
  * ================================
4090
4119
  */
4091
- writeSystem: writeSystem(join21(path9, "systems")),
4092
- writeSystemToDomain: writeSystemToDomain(join21(path9)),
4093
- getSystem: getSystem(join21(path9)),
4094
- getSystemByPath: getSystemByPath(join21(path9)),
4095
- getSystems: getSystems(join21(path9)),
4096
- versionSystem: versionSystem(join21(path9)),
4097
- rmSystem: rmSystem(join21(path9, "systems")),
4098
- rmSystemById: rmSystemById(join21(path9)),
4099
- addFileToSystem: addFileToSystem(join21(path9)),
4100
- addServiceToSystem: addServiceToSystem(join21(path9)),
4101
- addFlowToSystem: addFlowToSystem(join21(path9)),
4102
- addEntityToSystem: addEntityToSystem(join21(path9)),
4103
- addContainerToSystem: addContainerToSystem(join21(path9)),
4104
- systemHasVersion: systemHasVersion(join21(path9)),
4105
- isSystem: isSystem(join21(path9)),
4106
- toSystem: toSystem(join21(path9)),
4120
+ writeSystem: writeSystem(join22(path9, "systems")),
4121
+ writeSystemToDomain: writeSystemToDomain(join22(path9)),
4122
+ getSystem: getSystem(join22(path9)),
4123
+ getSystemByPath: getSystemByPath(join22(path9)),
4124
+ getSystems: getSystems(join22(path9)),
4125
+ versionSystem: versionSystem(join22(path9)),
4126
+ rmSystem: rmSystem(join22(path9, "systems")),
4127
+ rmSystemById: rmSystemById(join22(path9)),
4128
+ addFileToSystem: addFileToSystem(join22(path9)),
4129
+ addServiceToSystem: addServiceToSystem(join22(path9)),
4130
+ addFlowToSystem: addFlowToSystem(join22(path9)),
4131
+ addEntityToSystem: addEntityToSystem(join22(path9)),
4132
+ addContainerToSystem: addContainerToSystem(join22(path9)),
4133
+ systemHasVersion: systemHasVersion(join22(path9)),
4134
+ isSystem: isSystem(join22(path9)),
4135
+ toSystem: toSystem(join22(path9)),
4107
4136
  /**
4108
4137
  * ================================
4109
4138
  * Agents
4110
4139
  * ================================
4111
4140
  */
4112
- writeAgent: writeAgent(join21(path9, "agents")),
4113
- writeVersionedAgent: writeVersionedAgent(join21(path9, "agents")),
4114
- writeAgentToDomain: writeAgentToDomain(join21(path9, "domains")),
4115
- getAgent: getAgent(join21(path9)),
4116
- getAgentByPath: getAgentByPath(join21(path9)),
4117
- getAgents: getAgents(join21(path9)),
4118
- versionAgent: versionAgent(join21(path9)),
4119
- rmAgent: rmAgent(join21(path9, "agents")),
4120
- rmAgentById: rmAgentById(join21(path9)),
4121
- addFileToAgent: addFileToAgent(join21(path9)),
4122
- addEventToAgent: addMessageToAgent(join21(path9)),
4123
- addCommandToAgent: addMessageToAgent(join21(path9)),
4124
- addQueryToAgent: addMessageToAgent(join21(path9)),
4125
- addDataStoreToAgent: addDataStoreToAgent(join21(path9)),
4126
- addFlowToAgent: addFlowToAgent(join21(path9)),
4127
- agentHasVersion: agentHasVersion(join21(path9)),
4128
- isAgent: isAgent(join21(path9)),
4129
- toAgent: toAgent(join21(path9)),
4141
+ writeAgent: writeAgent(join22(path9, "agents")),
4142
+ writeVersionedAgent: writeVersionedAgent(join22(path9, "agents")),
4143
+ writeAgentToDomain: writeAgentToDomain(join22(path9, "domains")),
4144
+ getAgent: getAgent(join22(path9)),
4145
+ getAgentByPath: getAgentByPath(join22(path9)),
4146
+ getAgents: getAgents(join22(path9)),
4147
+ versionAgent: versionAgent(join22(path9)),
4148
+ rmAgent: rmAgent(join22(path9, "agents")),
4149
+ rmAgentById: rmAgentById(join22(path9)),
4150
+ addFileToAgent: addFileToAgent(join22(path9)),
4151
+ addEventToAgent: addMessageToAgent(join22(path9)),
4152
+ addCommandToAgent: addMessageToAgent(join22(path9)),
4153
+ addQueryToAgent: addMessageToAgent(join22(path9)),
4154
+ addDataStoreToAgent: addDataStoreToAgent(join22(path9)),
4155
+ addFlowToAgent: addFlowToAgent(join22(path9)),
4156
+ agentHasVersion: agentHasVersion(join22(path9)),
4157
+ isAgent: isAgent(join22(path9)),
4158
+ toAgent: toAgent(join22(path9)),
4130
4159
  /**
4131
4160
  * ================================
4132
4161
  * Domains
@@ -4139,39 +4168,39 @@ var src_default = (path9) => {
4139
4168
  * @param options - Optional options to write the event
4140
4169
  *
4141
4170
  */
4142
- writeDomain: writeDomain(join21(path9, "domains")),
4171
+ writeDomain: writeDomain(join22(path9, "domains")),
4143
4172
  /**
4144
4173
  * Returns a domain from EventCatalog
4145
4174
  * @param id - The id of the domain to retrieve
4146
4175
  * @param version - Optional id of the version to get (supports semver)
4147
4176
  * @returns Domain|Undefined
4148
4177
  */
4149
- getDomain: getDomain(join21(path9, "domains")),
4178
+ getDomain: getDomain(join22(path9, "domains")),
4150
4179
  /**
4151
4180
  * Returns all domains from EventCatalog
4152
4181
  * @param latestOnly - optional boolean, set to true to get only latest versions
4153
4182
  * @returns Domain[]|Undefined
4154
4183
  */
4155
- getDomains: getDomains(join21(path9)),
4184
+ getDomains: getDomains(join22(path9)),
4156
4185
  /**
4157
4186
  * Moves a given domain id to the version directory
4158
4187
  * @param directory
4159
4188
  */
4160
- versionDomain: versionDomain(join21(path9, "domains")),
4189
+ versionDomain: versionDomain(join22(path9, "domains")),
4161
4190
  /**
4162
4191
  * Remove a domain from EventCatalog (modeled on the standard POSIX rm utility)
4163
4192
  *
4164
4193
  * @param path - The path to your domain, e.g. `/Payment`
4165
4194
  *
4166
4195
  */
4167
- rmDomain: rmDomain(join21(path9, "domains")),
4196
+ rmDomain: rmDomain(join22(path9, "domains")),
4168
4197
  /**
4169
4198
  * Remove an service by an domain id
4170
4199
  *
4171
4200
  * @param id - The id of the domain you want to remove
4172
4201
  *
4173
4202
  */
4174
- rmDomainById: rmDomainById(join21(path9, "domains")),
4203
+ rmDomainById: rmDomainById(join22(path9, "domains")),
4175
4204
  /**
4176
4205
  * Adds a file to the given domain
4177
4206
  * @param id - The id of the domain to add the file to
@@ -4179,28 +4208,28 @@ var src_default = (path9) => {
4179
4208
  * @param version - Optional version of the domain to add the file to
4180
4209
  * @returns
4181
4210
  */
4182
- addFileToDomain: addFileToDomain(join21(path9, "domains")),
4211
+ addFileToDomain: addFileToDomain(join22(path9, "domains")),
4183
4212
  /**
4184
4213
  * Adds an ubiquitous language dictionary to a domain
4185
4214
  * @param id - The id of the domain to add the ubiquitous language to
4186
4215
  * @param ubiquitousLanguageDictionary - The ubiquitous language dictionary to add
4187
4216
  * @param version - Optional version of the domain to add the ubiquitous language to
4188
4217
  */
4189
- addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain(join21(path9, "domains")),
4218
+ addUbiquitousLanguageToDomain: addUbiquitousLanguageToDomain(join22(path9, "domains")),
4190
4219
  /**
4191
4220
  * Get the ubiquitous language dictionary from a domain
4192
4221
  * @param id - The id of the domain to get the ubiquitous language from
4193
4222
  * @param version - Optional version of the domain to get the ubiquitous language from
4194
4223
  * @returns
4195
4224
  */
4196
- getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain(join21(path9, "domains")),
4225
+ getUbiquitousLanguageFromDomain: getUbiquitousLanguageFromDomain(join22(path9, "domains")),
4197
4226
  /**
4198
4227
  * Check to see if a domain version exists
4199
4228
  * @param id - The id of the domain
4200
4229
  * @param version - The version of the domain (supports semver)
4201
4230
  * @returns
4202
4231
  */
4203
- domainHasVersion: domainHasVersion(join21(path9)),
4232
+ domainHasVersion: domainHasVersion(join22(path9)),
4204
4233
  /**
4205
4234
  * Adds a given service to a domain
4206
4235
  * @param id - The id of the domain
@@ -4208,7 +4237,7 @@ var src_default = (path9) => {
4208
4237
  * @param version - (Optional) The version of the domain to add the service to
4209
4238
  * @returns
4210
4239
  */
4211
- addServiceToDomain: addServiceToDomain(join21(path9, "domains")),
4240
+ addServiceToDomain: addServiceToDomain(join22(path9, "domains")),
4212
4241
  /**
4213
4242
  * Adds a given agent to a domain
4214
4243
  * @param id - The id of the domain
@@ -4216,7 +4245,7 @@ var src_default = (path9) => {
4216
4245
  * @param version - (Optional) The version of the domain to add the agent to
4217
4246
  * @returns
4218
4247
  */
4219
- addAgentToDomain: addAgentToDomain(join21(path9, "domains")),
4248
+ addAgentToDomain: addAgentToDomain(join22(path9, "domains")),
4220
4249
  /**
4221
4250
  * Adds a given subdomain to a domain
4222
4251
  * @param id - The id of the domain
@@ -4224,7 +4253,7 @@ var src_default = (path9) => {
4224
4253
  * @param version - (Optional) The version of the domain to add the subdomain to
4225
4254
  * @returns
4226
4255
  */
4227
- addSubDomainToDomain: addSubDomainToDomain(join21(path9, "domains")),
4256
+ addSubDomainToDomain: addSubDomainToDomain(join22(path9, "domains")),
4228
4257
  /**
4229
4258
  * Adds a given system to a domain
4230
4259
  * @param id - The id of the domain
@@ -4232,7 +4261,7 @@ var src_default = (path9) => {
4232
4261
  * @param version - (Optional) The version of the domain to add the system to
4233
4262
  * @returns
4234
4263
  */
4235
- addSystemToDomain: addSystemToDomain(join21(path9, "domains")),
4264
+ addSystemToDomain: addSystemToDomain(join22(path9, "domains")),
4236
4265
  /**
4237
4266
  * Adds an entity to a domain
4238
4267
  * @param id - The id of the domain
@@ -4240,7 +4269,7 @@ var src_default = (path9) => {
4240
4269
  * @param version - (Optional) The version of the domain to add the entity to
4241
4270
  * @returns
4242
4271
  */
4243
- addEntityToDomain: addEntityToDomain(join21(path9, "domains")),
4272
+ addEntityToDomain: addEntityToDomain(join22(path9, "domains")),
4244
4273
  /**
4245
4274
  * Add an event to a domain by its id.
4246
4275
  *
@@ -4258,7 +4287,7 @@ var src_default = (path9) => {
4258
4287
  *
4259
4288
  * ```
4260
4289
  */
4261
- addEventToDomain: addMessageToDomain(join21(path9, "domains")),
4290
+ addEventToDomain: addMessageToDomain(join22(path9, "domains")),
4262
4291
  /**
4263
4292
  * Add a command to a domain by its id.
4264
4293
  *
@@ -4276,7 +4305,7 @@ var src_default = (path9) => {
4276
4305
  *
4277
4306
  * ```
4278
4307
  */
4279
- addCommandToDomain: addMessageToDomain(join21(path9, "domains")),
4308
+ addCommandToDomain: addMessageToDomain(join22(path9, "domains")),
4280
4309
  /**
4281
4310
  * Add a query to a domain by its id.
4282
4311
  *
@@ -4294,7 +4323,7 @@ var src_default = (path9) => {
4294
4323
  *
4295
4324
  * ```
4296
4325
  */
4297
- addQueryToDomain: addMessageToDomain(join21(path9, "domains")),
4326
+ addQueryToDomain: addMessageToDomain(join22(path9, "domains")),
4298
4327
  /**
4299
4328
  * ================================
4300
4329
  * Teams
@@ -4307,25 +4336,25 @@ var src_default = (path9) => {
4307
4336
  * @param options - Optional options to write the team
4308
4337
  *
4309
4338
  */
4310
- writeTeam: writeTeam(join21(path9, "teams")),
4339
+ writeTeam: writeTeam(join22(path9, "teams")),
4311
4340
  /**
4312
4341
  * Returns a team from EventCatalog
4313
4342
  * @param id - The id of the team to retrieve
4314
4343
  * @returns Team|Undefined
4315
4344
  */
4316
- getTeam: getTeam(join21(path9, "teams")),
4345
+ getTeam: getTeam(join22(path9, "teams")),
4317
4346
  /**
4318
4347
  * Returns all teams from EventCatalog
4319
4348
  * @returns Team[]|Undefined
4320
4349
  */
4321
- getTeams: getTeams(join21(path9, "teams")),
4350
+ getTeams: getTeams(join22(path9, "teams")),
4322
4351
  /**
4323
4352
  * Remove a team by the team id
4324
4353
  *
4325
4354
  * @param id - The id of the team you want to remove
4326
4355
  *
4327
4356
  */
4328
- rmTeamById: rmTeamById(join21(path9, "teams")),
4357
+ rmTeamById: rmTeamById(join22(path9, "teams")),
4329
4358
  /**
4330
4359
  * ================================
4331
4360
  * Users
@@ -4338,25 +4367,25 @@ var src_default = (path9) => {
4338
4367
  * @param options - Optional options to write the user
4339
4368
  *
4340
4369
  */
4341
- writeUser: writeUser(join21(path9, "users")),
4370
+ writeUser: writeUser(join22(path9, "users")),
4342
4371
  /**
4343
4372
  * Returns a user from EventCatalog
4344
4373
  * @param id - The id of the user to retrieve
4345
4374
  * @returns User|Undefined
4346
4375
  */
4347
- getUser: getUser(join21(path9, "users")),
4376
+ getUser: getUser(join22(path9, "users")),
4348
4377
  /**
4349
4378
  * Returns all user from EventCatalog
4350
4379
  * @returns User[]|Undefined
4351
4380
  */
4352
- getUsers: getUsers(join21(path9)),
4381
+ getUsers: getUsers(join22(path9)),
4353
4382
  /**
4354
4383
  * Remove a user by the user id
4355
4384
  *
4356
4385
  * @param id - The id of the user you want to remove
4357
4386
  *
4358
4387
  */
4359
- rmUserById: rmUserById(join21(path9, "users")),
4388
+ rmUserById: rmUserById(join22(path9, "users")),
4360
4389
  /**
4361
4390
  * ================================
4362
4391
  * Custom Docs
@@ -4367,32 +4396,32 @@ var src_default = (path9) => {
4367
4396
  * @param path - The path to the custom doc to retrieve
4368
4397
  * @returns CustomDoc|Undefined
4369
4398
  */
4370
- getCustomDoc: getCustomDoc(join21(path9, "docs")),
4399
+ getCustomDoc: getCustomDoc(join22(path9, "docs")),
4371
4400
  /**
4372
4401
  * Returns all custom docs from EventCatalog
4373
4402
  * @param options - Optional options to get custom docs from a specific path
4374
4403
  * @returns CustomDoc[]|Undefined
4375
4404
  */
4376
- getCustomDocs: getCustomDocs(join21(path9, "docs")),
4405
+ getCustomDocs: getCustomDocs(join22(path9, "docs")),
4377
4406
  /**
4378
4407
  * Writes a custom doc to EventCatalog
4379
4408
  * @param customDoc - The custom doc to write
4380
4409
  * @param options - Optional options to write the custom doc
4381
4410
  *
4382
4411
  */
4383
- writeCustomDoc: writeCustomDoc(join21(path9, "docs")),
4412
+ writeCustomDoc: writeCustomDoc(join22(path9, "docs")),
4384
4413
  /**
4385
4414
  * Removes a custom doc from EventCatalog
4386
4415
  * @param path - The path to the custom doc to remove
4387
4416
  *
4388
4417
  */
4389
- rmCustomDoc: rmCustomDoc(join21(path9, "docs")),
4418
+ rmCustomDoc: rmCustomDoc(join22(path9, "docs")),
4390
4419
  /**
4391
4420
  * Dumps the catalog to a JSON file.
4392
4421
  * @param directory - The directory to dump the catalog to
4393
4422
  * @returns A JSON file with the catalog
4394
4423
  */
4395
- dumpCatalog: dumpCatalog(join21(path9)),
4424
+ dumpCatalog: dumpCatalog(join22(path9)),
4396
4425
  /**
4397
4426
  * Returns the event catalog configuration file.
4398
4427
  * The event catalog configuration file is the file that contains the configuration for the event catalog.
@@ -4400,7 +4429,7 @@ var src_default = (path9) => {
4400
4429
  * @param directory - The directory of the catalog.
4401
4430
  * @returns A JSON object with the configuration for the event catalog.
4402
4431
  */
4403
- getEventCatalogConfigurationFile: getEventCatalogConfigurationFile(join21(path9)),
4432
+ getEventCatalogConfigurationFile: getEventCatalogConfigurationFile(join22(path9)),
4404
4433
  /**
4405
4434
  * ================================
4406
4435
  * Changelogs
@@ -4414,7 +4443,7 @@ var src_default = (path9) => {
4414
4443
  * @param options - Optional options (version, format)
4415
4444
  *
4416
4445
  */
4417
- writeChangelog: writeChangelog(join21(path9)),
4446
+ writeChangelog: writeChangelog(join22(path9)),
4418
4447
  /**
4419
4448
  * Appends a changelog entry to an existing changelog for a resource.
4420
4449
  * If no changelog exists, one is created.
@@ -4424,7 +4453,7 @@ var src_default = (path9) => {
4424
4453
  * @param options - Optional options (version, format)
4425
4454
  *
4426
4455
  */
4427
- appendChangelog: appendChangelog(join21(path9)),
4456
+ appendChangelog: appendChangelog(join22(path9)),
4428
4457
  /**
4429
4458
  * Returns the changelog for a resource in EventCatalog
4430
4459
  *
@@ -4432,7 +4461,7 @@ var src_default = (path9) => {
4432
4461
  * @param options - Optional options (version)
4433
4462
  * @returns Changelog|Undefined
4434
4463
  */
4435
- getChangelog: getChangelog(join21(path9)),
4464
+ getChangelog: getChangelog(join22(path9)),
4436
4465
  /**
4437
4466
  * Removes the changelog for a resource in EventCatalog
4438
4467
  *
@@ -4440,7 +4469,7 @@ var src_default = (path9) => {
4440
4469
  * @param options - Optional options (version)
4441
4470
  *
4442
4471
  */
4443
- rmChangelog: rmChangelog(join21(path9)),
4472
+ rmChangelog: rmChangelog(join22(path9)),
4444
4473
  /**
4445
4474
  * ================================
4446
4475
  * Resources Utils
@@ -4469,26 +4498,26 @@ var src_default = (path9) => {
4469
4498
  * @param path - The path to the message to retrieve
4470
4499
  * @returns Message|Undefined
4471
4500
  */
4472
- getMessageBySchemaPath: getMessageBySchemaPath(join21(path9)),
4501
+ getMessageBySchemaPath: getMessageBySchemaPath(join22(path9)),
4473
4502
  /**
4474
4503
  * Returns the producers and consumers (services and agents) for a given message
4475
4504
  * @param id - The id of the message to get the producers and consumers for
4476
4505
  * @param version - Optional version of the message
4477
4506
  * @returns { producers: (Service|Agent)[], consumers: (Service|Agent)[] }
4478
4507
  */
4479
- getProducersAndConsumersForMessage: getProducersAndConsumersForMessage(join21(path9)),
4508
+ getProducersAndConsumersForMessage: getProducersAndConsumersForMessage(join22(path9)),
4480
4509
  /**
4481
4510
  * Returns the consumers of a given schema path
4482
4511
  * @param path - The path to the schema to get the consumers for
4483
4512
  * @returns (Service|Agent)[]
4484
4513
  */
4485
- getConsumersOfSchema: getConsumersOfSchema(join21(path9)),
4514
+ getConsumersOfSchema: getConsumersOfSchema(join22(path9)),
4486
4515
  /**
4487
4516
  * Returns the producers of a given schema path
4488
4517
  * @param path - The path to the schema to get the producers for
4489
4518
  * @returns (Service|Agent)[]
4490
4519
  */
4491
- getProducersOfSchema: getProducersOfSchema(join21(path9)),
4520
+ getProducersOfSchema: getProducersOfSchema(join22(path9)),
4492
4521
  /**
4493
4522
  * Returns the schema for a given message (event, command or query) by its id and version.
4494
4523
  * If no version is given, the latest version is used.
@@ -4496,14 +4525,14 @@ var src_default = (path9) => {
4496
4525
  * @param version - Optional version of the message
4497
4526
  * @returns { schema: string, fileName: string } | undefined
4498
4527
  */
4499
- getSchemaForMessage: getSchemaForMessage(join21(path9)),
4528
+ getSchemaForMessage: getSchemaForMessage(join22(path9)),
4500
4529
  /**
4501
4530
  * Returns the owners for a given resource (e.g domain, service, event, command, query, etc.)
4502
4531
  * @param id - The id of the resource to get the owners for
4503
4532
  * @param version - Optional version of the resource
4504
4533
  * @returns { owners: User[] }
4505
4534
  */
4506
- getOwnersForResource: getOwnersForResource(join21(path9)),
4535
+ getOwnersForResource: getOwnersForResource(join22(path9)),
4507
4536
  /**
4508
4537
  * ================================
4509
4538
  * Entities
@@ -4515,13 +4544,13 @@ var src_default = (path9) => {
4515
4544
  * @param version - Optional id of the version to get (supports semver)
4516
4545
  * @returns Entity|Undefined
4517
4546
  */
4518
- getEntity: getEntity(join21(path9)),
4547
+ getEntity: getEntity(join22(path9)),
4519
4548
  /**
4520
4549
  * Returns all entities from EventCatalog
4521
4550
  * @param latestOnly - optional boolean, set to true to get only latest versions
4522
4551
  * @returns Entity[]|Undefined
4523
4552
  */
4524
- getEntities: getEntities(join21(path9)),
4553
+ getEntities: getEntities(join22(path9)),
4525
4554
  /**
4526
4555
  * Adds an entity to EventCatalog
4527
4556
  *
@@ -4529,7 +4558,7 @@ var src_default = (path9) => {
4529
4558
  * @param options - Optional options to write the entity
4530
4559
  *
4531
4560
  */
4532
- writeEntity: writeEntity(join21(path9, "entities")),
4561
+ writeEntity: writeEntity(join22(path9, "entities")),
4533
4562
  /**
4534
4563
  * Adds an entity to a system in EventCatalog
4535
4564
  *
@@ -4538,33 +4567,33 @@ var src_default = (path9) => {
4538
4567
  * @param options - Optional options to write the entity
4539
4568
  *
4540
4569
  */
4541
- writeEntityToSystem: writeEntityToSystem(join21(path9)),
4570
+ writeEntityToSystem: writeEntityToSystem(join22(path9)),
4542
4571
  /**
4543
4572
  * Remove an entity from EventCatalog (modeled on the standard POSIX rm utility)
4544
4573
  *
4545
4574
  * @param path - The path to your entity, e.g. `/User`
4546
4575
  *
4547
4576
  */
4548
- rmEntity: rmEntity(join21(path9, "entities")),
4577
+ rmEntity: rmEntity(join22(path9, "entities")),
4549
4578
  /**
4550
4579
  * Remove an entity by an entity id
4551
4580
  *
4552
4581
  * @param id - The id of the entity you want to remove
4553
4582
  *
4554
4583
  */
4555
- rmEntityById: rmEntityById(join21(path9)),
4584
+ rmEntityById: rmEntityById(join22(path9)),
4556
4585
  /**
4557
4586
  * Moves a given entity id to the version directory
4558
4587
  * @param id - The id of the entity to version
4559
4588
  */
4560
- versionEntity: versionEntity(join21(path9)),
4589
+ versionEntity: versionEntity(join22(path9)),
4561
4590
  /**
4562
4591
  * Check to see if an entity version exists
4563
4592
  * @param id - The id of the entity
4564
4593
  * @param version - The version of the entity (supports semver)
4565
4594
  * @returns
4566
4595
  */
4567
- entityHasVersion: entityHasVersion(join21(path9)),
4596
+ entityHasVersion: entityHasVersion(join22(path9)),
4568
4597
  /**
4569
4598
  * ================================
4570
4599
  * Flows
@@ -4577,7 +4606,7 @@ var src_default = (path9) => {
4577
4606
  * @param version - Optional version of the flow
4578
4607
  * @returns Flow
4579
4608
  */
4580
- getFlow: getFlow(join21(path9)),
4609
+ getFlow: getFlow(join22(path9)),
4581
4610
  /**
4582
4611
  * Returns all flows from EventCatalog
4583
4612
  *
@@ -4585,7 +4614,7 @@ var src_default = (path9) => {
4585
4614
  * @param latestOnly - optional boolean, set to true to get only latest versions
4586
4615
  * @returns Flow[]|Undefined
4587
4616
  */
4588
- getFlows: getFlows(join21(path9)),
4617
+ getFlows: getFlows(join22(path9)),
4589
4618
  /**
4590
4619
  * Adds a flow to EventCatalog
4591
4620
  *
@@ -4593,14 +4622,14 @@ var src_default = (path9) => {
4593
4622
  * @param options - Optional options to write the flow
4594
4623
  *
4595
4624
  */
4596
- writeFlow: writeFlow(join21(path9, "flows")),
4625
+ writeFlow: writeFlow(join22(path9, "flows")),
4597
4626
  /**
4598
4627
  * Adds a versioned flow to EventCatalog
4599
4628
  *
4600
4629
  * @param flow - The flow to write
4601
4630
  *
4602
4631
  */
4603
- writeVersionedFlow: writeVersionedFlow(join21(path9, "flows")),
4632
+ writeVersionedFlow: writeVersionedFlow(join22(path9, "flows")),
4604
4633
  /**
4605
4634
  * Adds a flow to a domain in EventCatalog
4606
4635
  *
@@ -4609,7 +4638,7 @@ var src_default = (path9) => {
4609
4638
  * @param options - Optional options to write the flow
4610
4639
  *
4611
4640
  */
4612
- writeFlowToDomain: writeFlowToDomain(join21(path9, "domains")),
4641
+ writeFlowToDomain: writeFlowToDomain(join22(path9, "domains")),
4613
4642
  /**
4614
4643
  * Adds a flow to a service in EventCatalog
4615
4644
  *
@@ -4618,7 +4647,7 @@ var src_default = (path9) => {
4618
4647
  * @param options - Optional options to write the flow
4619
4648
  *
4620
4649
  */
4621
- writeFlowToService: writeFlowToService(join21(path9, "services")),
4650
+ writeFlowToService: writeFlowToService(join22(path9, "services")),
4622
4651
  /**
4623
4652
  * Adds a flow to a system in EventCatalog
4624
4653
  *
@@ -4627,7 +4656,7 @@ var src_default = (path9) => {
4627
4656
  * @param options - Optional options to write the flow
4628
4657
  *
4629
4658
  */
4630
- writeFlowToSystem: writeFlowToSystem(join21(path9)),
4659
+ writeFlowToSystem: writeFlowToSystem(join22(path9)),
4631
4660
  /**
4632
4661
  * Adds a flow to an agent in EventCatalog
4633
4662
  *
@@ -4636,33 +4665,33 @@ var src_default = (path9) => {
4636
4665
  * @param options - Optional options to write the flow
4637
4666
  *
4638
4667
  */
4639
- writeFlowToAgent: writeFlowToAgent(join21(path9, "agents")),
4668
+ writeFlowToAgent: writeFlowToAgent(join22(path9, "agents")),
4640
4669
  /**
4641
4670
  * Remove a flow from EventCatalog (modeled on the standard POSIX rm utility)
4642
4671
  *
4643
4672
  * @param path - The path to your flow, e.g. `/PaymentFlow`
4644
4673
  *
4645
4674
  */
4646
- rmFlow: rmFlow(join21(path9, "flows")),
4675
+ rmFlow: rmFlow(join22(path9, "flows")),
4647
4676
  /**
4648
4677
  * Remove a flow by a flow id
4649
4678
  *
4650
4679
  * @param id - The id of the flow you want to remove
4651
4680
  *
4652
4681
  */
4653
- rmFlowById: rmFlowById(join21(path9)),
4682
+ rmFlowById: rmFlowById(join22(path9)),
4654
4683
  /**
4655
4684
  * Moves a given flow id to the version directory
4656
4685
  * @param id - The id of the flow to version
4657
4686
  */
4658
- versionFlow: versionFlow(join21(path9)),
4687
+ versionFlow: versionFlow(join22(path9)),
4659
4688
  /**
4660
4689
  * Check to see if a flow version exists
4661
4690
  * @param id - The id of the flow
4662
4691
  * @param version - The version of the flow (supports semver)
4663
4692
  * @returns
4664
4693
  */
4665
- flowHasVersion: flowHasVersion(join21(path9)),
4694
+ flowHasVersion: flowHasVersion(join22(path9)),
4666
4695
  /**
4667
4696
  * Adds a file to the given flow
4668
4697
  * @param id - The id of the flow to add the file to
@@ -4670,7 +4699,7 @@ var src_default = (path9) => {
4670
4699
  * @param version - Optional version of the flow to add the file to
4671
4700
  * @returns
4672
4701
  */
4673
- addFileToFlow: addFileToFlow(join21(path9)),
4702
+ addFileToFlow: addFileToFlow(join22(path9)),
4674
4703
  /**
4675
4704
  * ================================
4676
4705
  * Data Stores
@@ -4682,42 +4711,42 @@ var src_default = (path9) => {
4682
4711
  * @param options - Optional options to write the data store
4683
4712
  *
4684
4713
  */
4685
- writeDataStore: writeDataStore(join21(path9, "containers")),
4714
+ writeDataStore: writeDataStore(join22(path9, "containers")),
4686
4715
  /**
4687
4716
  * Returns a data store from EventCatalog
4688
4717
  * @param id - The id of the data store to retrieve
4689
4718
  * @param version - Optional id of the version to get (supports semver)
4690
4719
  * @returns Container|Undefined
4691
4720
  */
4692
- getDataStore: getDataStore(join21(path9)),
4721
+ getDataStore: getDataStore(join22(path9)),
4693
4722
  /**
4694
4723
  * Returns all data stores from EventCatalog
4695
4724
  * @param latestOnly - optional boolean, set to true to get only latest versions
4696
4725
  * @returns Container[]|Undefined
4697
4726
  */
4698
- getDataStores: getDataStores(join21(path9)),
4727
+ getDataStores: getDataStores(join22(path9)),
4699
4728
  /**
4700
4729
  * Version a data store by its id
4701
4730
  * @param id - The id of the data store to version
4702
4731
  */
4703
- versionDataStore: versionDataStore(join21(path9, "containers")),
4732
+ versionDataStore: versionDataStore(join22(path9, "containers")),
4704
4733
  /**
4705
4734
  * Remove a data store by its path
4706
4735
  * @param path - The path to the data store to remove
4707
4736
  */
4708
- rmDataStore: rmDataStore(join21(path9, "containers")),
4737
+ rmDataStore: rmDataStore(join22(path9, "containers")),
4709
4738
  /**
4710
4739
  * Remove a data store by its id
4711
4740
  * @param id - The id of the data store to remove
4712
4741
  */
4713
- rmDataStoreById: rmDataStoreById(join21(path9)),
4742
+ rmDataStoreById: rmDataStoreById(join22(path9)),
4714
4743
  /**
4715
4744
  * Check to see if a data store version exists
4716
4745
  * @param id - The id of the data store
4717
4746
  * @param version - The version of the data store (supports semver)
4718
4747
  * @returns
4719
4748
  */
4720
- dataStoreHasVersion: dataStoreHasVersion(join21(path9)),
4749
+ dataStoreHasVersion: dataStoreHasVersion(join22(path9)),
4721
4750
  /**
4722
4751
  * Adds a file to a data store by its id
4723
4752
  * @param id - The id of the data store to add the file to
@@ -4725,21 +4754,21 @@ var src_default = (path9) => {
4725
4754
  * @param version - Optional version of the data store to add the file to
4726
4755
  * @returns
4727
4756
  */
4728
- addFileToDataStore: addFileToDataStore(join21(path9)),
4757
+ addFileToDataStore: addFileToDataStore(join22(path9)),
4729
4758
  /**
4730
4759
  * Writes a data store to a service by its id
4731
4760
  * @param dataStore - The data store to write
4732
4761
  * @param service - The service to write the data store to
4733
4762
  * @returns
4734
4763
  */
4735
- writeDataStoreToService: writeDataStoreToService(join21(path9)),
4764
+ writeDataStoreToService: writeDataStoreToService(join22(path9)),
4736
4765
  /**
4737
4766
  * Writes a data store to a system by its id
4738
4767
  * @param dataStore - The data store to write
4739
4768
  * @param system - The system to write the data store to
4740
4769
  * @returns
4741
4770
  */
4742
- writeDataStoreToSystem: writeDataStoreToSystem(join21(path9)),
4771
+ writeDataStoreToSystem: writeDataStoreToSystem(join22(path9)),
4743
4772
  /**
4744
4773
  * ================================
4745
4774
  * Data Products
@@ -4751,7 +4780,7 @@ var src_default = (path9) => {
4751
4780
  * @param options - Optional options to write the data product
4752
4781
  *
4753
4782
  */
4754
- writeDataProduct: writeDataProduct(join21(path9, "data-products")),
4783
+ writeDataProduct: writeDataProduct(join22(path9, "data-products")),
4755
4784
  /**
4756
4785
  * Writes a data product to a domain in EventCatalog
4757
4786
  * @param dataProduct - The data product to write
@@ -4759,43 +4788,43 @@ var src_default = (path9) => {
4759
4788
  * @param options - Optional options to write the data product
4760
4789
  *
4761
4790
  */
4762
- writeDataProductToDomain: writeDataProductToDomain(join21(path9, "domains")),
4791
+ writeDataProductToDomain: writeDataProductToDomain(join22(path9, "domains")),
4763
4792
  /**
4764
4793
  * Returns a data product from EventCatalog
4765
4794
  * @param id - The id of the data product to retrieve
4766
4795
  * @param version - Optional id of the version to get (supports semver)
4767
4796
  * @returns DataProduct|Undefined
4768
4797
  */
4769
- getDataProduct: getDataProduct(join21(path9)),
4798
+ getDataProduct: getDataProduct(join22(path9)),
4770
4799
  /**
4771
4800
  * Returns all data products from EventCatalog
4772
4801
  * @param latestOnly - optional boolean, set to true to get only latest versions
4773
4802
  * @returns DataProduct[]|Undefined
4774
4803
  */
4775
- getDataProducts: getDataProducts(join21(path9)),
4804
+ getDataProducts: getDataProducts(join22(path9)),
4776
4805
  /**
4777
4806
  * Version a data product by its id
4778
4807
  * @param id - The id of the data product to version
4779
4808
  */
4780
- versionDataProduct: versionDataProduct(join21(path9)),
4809
+ versionDataProduct: versionDataProduct(join22(path9)),
4781
4810
  /**
4782
4811
  * Remove a data product by its path
4783
4812
  * @param path - The path to the data product to remove
4784
4813
  */
4785
- rmDataProduct: rmDataProduct(join21(path9, "data-products")),
4814
+ rmDataProduct: rmDataProduct(join22(path9, "data-products")),
4786
4815
  /**
4787
4816
  * Remove a data product by its id
4788
4817
  * @param id - The id of the data product to remove
4789
4818
  * @param version - Optional version of the data product to remove
4790
4819
  */
4791
- rmDataProductById: rmDataProductById(join21(path9)),
4820
+ rmDataProductById: rmDataProductById(join22(path9)),
4792
4821
  /**
4793
4822
  * Check to see if a data product version exists
4794
4823
  * @param id - The id of the data product
4795
4824
  * @param version - The version of the data product (supports semver)
4796
4825
  * @returns
4797
4826
  */
4798
- dataProductHasVersion: dataProductHasVersion(join21(path9)),
4827
+ dataProductHasVersion: dataProductHasVersion(join22(path9)),
4799
4828
  /**
4800
4829
  * Adds a file to a data product by its id
4801
4830
  * @param id - The id of the data product to add the file to
@@ -4803,7 +4832,7 @@ var src_default = (path9) => {
4803
4832
  * @param version - Optional version of the data product to add the file to
4804
4833
  * @returns
4805
4834
  */
4806
- addFileToDataProduct: addFileToDataProduct(join21(path9)),
4835
+ addFileToDataProduct: addFileToDataProduct(join22(path9)),
4807
4836
  /**
4808
4837
  * Adds a data product to a domain
4809
4838
  * @param id - The id of the domain
@@ -4811,7 +4840,7 @@ var src_default = (path9) => {
4811
4840
  * @param version - (Optional) The version of the domain to add the data product to
4812
4841
  * @returns
4813
4842
  */
4814
- addDataProductToDomain: addDataProductToDomain(join21(path9, "domains")),
4843
+ addDataProductToDomain: addDataProductToDomain(join22(path9, "domains")),
4815
4844
  /**
4816
4845
  * ================================
4817
4846
  * Diagrams
@@ -4823,13 +4852,13 @@ var src_default = (path9) => {
4823
4852
  * @param version - Optional id of the version to get (supports semver)
4824
4853
  * @returns Diagram|Undefined
4825
4854
  */
4826
- getDiagram: getDiagram(join21(path9)),
4855
+ getDiagram: getDiagram(join22(path9)),
4827
4856
  /**
4828
4857
  * Returns all diagrams from EventCatalog
4829
4858
  * @param latestOnly - optional boolean, set to true to get only latest versions
4830
4859
  * @returns Diagram[]|Undefined
4831
4860
  */
4832
- getDiagrams: getDiagrams(join21(path9)),
4861
+ getDiagrams: getDiagrams(join22(path9)),
4833
4862
  /**
4834
4863
  * Adds a diagram to EventCatalog
4835
4864
  *
@@ -4837,33 +4866,33 @@ var src_default = (path9) => {
4837
4866
  * @param options - Optional options to write the diagram
4838
4867
  *
4839
4868
  */
4840
- writeDiagram: writeDiagram(join21(path9, "diagrams")),
4869
+ writeDiagram: writeDiagram(join22(path9, "diagrams")),
4841
4870
  /**
4842
4871
  * Remove a diagram from EventCatalog (modeled on the standard POSIX rm utility)
4843
4872
  *
4844
4873
  * @param path - The path to your diagram, e.g. `/ArchitectureDiagram`
4845
4874
  *
4846
4875
  */
4847
- rmDiagram: rmDiagram(join21(path9, "diagrams")),
4876
+ rmDiagram: rmDiagram(join22(path9, "diagrams")),
4848
4877
  /**
4849
4878
  * Remove a diagram by a diagram id
4850
4879
  *
4851
4880
  * @param id - The id of the diagram you want to remove
4852
4881
  *
4853
4882
  */
4854
- rmDiagramById: rmDiagramById(join21(path9)),
4883
+ rmDiagramById: rmDiagramById(join22(path9)),
4855
4884
  /**
4856
4885
  * Moves a given diagram id to the version directory
4857
4886
  * @param id - The id of the diagram to version
4858
4887
  */
4859
- versionDiagram: versionDiagram(join21(path9)),
4888
+ versionDiagram: versionDiagram(join22(path9)),
4860
4889
  /**
4861
4890
  * Check to see if a diagram version exists
4862
4891
  * @param id - The id of the diagram
4863
4892
  * @param version - The version of the diagram (supports semver)
4864
4893
  * @returns
4865
4894
  */
4866
- diagramHasVersion: diagramHasVersion(join21(path9)),
4895
+ diagramHasVersion: diagramHasVersion(join22(path9)),
4867
4896
  /**
4868
4897
  * Adds a file to the given diagram
4869
4898
  * @param id - The id of the diagram to add the file to
@@ -4871,7 +4900,20 @@ var src_default = (path9) => {
4871
4900
  * @param version - Optional version of the diagram to add the file to
4872
4901
  * @returns
4873
4902
  */
4874
- addFileToDiagram: addFileToDiagram(join21(path9)),
4903
+ addFileToDiagram: addFileToDiagram(join22(path9)),
4904
+ /**
4905
+ * ================================
4906
+ * ADRs
4907
+ * ================================
4908
+ */
4909
+ getAdr: getAdr(join22(path9)),
4910
+ getAdrs: getAdrs(join22(path9)),
4911
+ writeAdr: writeAdr(join22(path9, "adrs")),
4912
+ rmAdr: rmAdr(join22(path9, "adrs")),
4913
+ rmAdrById: rmAdrById(join22(path9)),
4914
+ versionAdr: versionAdr(join22(path9)),
4915
+ adrHasVersion: adrHasVersion(join22(path9)),
4916
+ addFileToAdr: addFileToAdr(join22(path9)),
4875
4917
  /**
4876
4918
  * ================================
4877
4919
  * DSL
@@ -4890,21 +4932,21 @@ var src_default = (path9) => {
4890
4932
  * const dsl = await sdk.toDSL(services, { type: 'service', hydrate: true });
4891
4933
  * ```
4892
4934
  */
4893
- createSnapshot: createSnapshot(join21(path9)),
4894
- diffSnapshots: diffSnapshots(join21(path9)),
4895
- listSnapshots: listSnapshots(join21(path9)),
4896
- toDSL: toDSL(join21(path9), {
4897
- getEvent: getEvent(join21(path9)),
4898
- getCommand: getCommand(join21(path9)),
4899
- getQuery: getQuery(join21(path9)),
4900
- getService: getService(join21(path9)),
4901
- getServices: getServices(join21(path9)),
4902
- getDomain: getDomain(join21(path9, "domains")),
4903
- getChannel: getChannel(join21(path9)),
4904
- getChannels: getChannels(join21(path9)),
4905
- getContainer: getDataStore(join21(path9)),
4906
- getTeam: getTeam(join21(path9, "teams")),
4907
- getUser: getUser(join21(path9, "users"))
4935
+ createSnapshot: createSnapshot(join22(path9)),
4936
+ diffSnapshots: diffSnapshots(join22(path9)),
4937
+ listSnapshots: listSnapshots(join22(path9)),
4938
+ toDSL: toDSL(join22(path9), {
4939
+ getEvent: getEvent(join22(path9)),
4940
+ getCommand: getCommand(join22(path9)),
4941
+ getQuery: getQuery(join22(path9)),
4942
+ getService: getService(join22(path9)),
4943
+ getServices: getServices(join22(path9)),
4944
+ getDomain: getDomain(join22(path9, "domains")),
4945
+ getChannel: getChannel(join22(path9)),
4946
+ getChannels: getChannels(join22(path9)),
4947
+ getContainer: getDataStore(join22(path9)),
4948
+ getTeam: getTeam(join22(path9, "teams")),
4949
+ getUser: getUser(join22(path9, "users"))
4908
4950
  })
4909
4951
  };
4910
4952
  };