@eventcatalog/sdk 1.3.1 → 1.4.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.
Files changed (46) hide show
  1. package/dist/channels.js +1 -1
  2. package/dist/channels.js.map +1 -1
  3. package/dist/channels.mjs +1 -1
  4. package/dist/channels.mjs.map +1 -1
  5. package/dist/commands.js +1 -1
  6. package/dist/commands.js.map +1 -1
  7. package/dist/commands.mjs +1 -1
  8. package/dist/commands.mjs.map +1 -1
  9. package/dist/domains.js +1 -1
  10. package/dist/domains.js.map +1 -1
  11. package/dist/domains.mjs +1 -1
  12. package/dist/domains.mjs.map +1 -1
  13. package/dist/events.js +1 -1
  14. package/dist/events.js.map +1 -1
  15. package/dist/events.mjs +1 -1
  16. package/dist/events.mjs.map +1 -1
  17. package/dist/index.d.mts +68 -6
  18. package/dist/index.d.ts +68 -6
  19. package/dist/index.js +219 -65
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +219 -65
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/queries.js +1 -1
  24. package/dist/queries.js.map +1 -1
  25. package/dist/queries.mjs +1 -1
  26. package/dist/queries.mjs.map +1 -1
  27. package/dist/services.js +1 -1
  28. package/dist/services.js.map +1 -1
  29. package/dist/services.mjs +1 -1
  30. package/dist/services.mjs.map +1 -1
  31. package/dist/teams.d.mts +83 -0
  32. package/dist/teams.d.ts +83 -0
  33. package/dist/teams.js +107 -0
  34. package/dist/teams.js.map +1 -0
  35. package/dist/teams.mjs +67 -0
  36. package/dist/teams.mjs.map +1 -0
  37. package/dist/types.d.d.mts +2 -0
  38. package/dist/types.d.d.ts +2 -0
  39. package/dist/types.d.js.map +1 -1
  40. package/dist/users.d.mts +83 -0
  41. package/dist/users.d.ts +83 -0
  42. package/dist/users.js +109 -0
  43. package/dist/users.js.map +1 -0
  44. package/dist/users.mjs +69 -0
  45. package/dist/users.mjs.map +1 -0
  46. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Event, Command, Query, Channel, Service, Domain } from './types.d.mjs';
1
+ import { Event, Command, Query, Channel, Service, Domain, Team, User } from './types.d.mjs';
2
2
 
3
3
  /**
4
4
  * Init the SDK for EventCatalog
@@ -463,11 +463,7 @@ declare const _default: (path: string) => {
463
463
  * @returns Service[]|Undefined
464
464
  */
465
465
  getServices: (options?: {
466
- latestOnly? /**
467
- * Returns all events from EventCatalog
468
- * @param latestOnly - optional boolean, set to true to get only latest versions
469
- * @returns Event[]|Undefined
470
- */: boolean;
466
+ latestOnly?: boolean;
471
467
  }) => Promise<Service[]>;
472
468
  /**
473
469
  * Moves a given service id to the version directory
@@ -662,6 +658,72 @@ declare const _default: (path: string) => {
662
658
  id: string;
663
659
  version: string;
664
660
  }, version?: string) => Promise<void>;
661
+ /**
662
+ * ================================
663
+ * Teams
664
+ * ================================
665
+ */
666
+ /**
667
+ * Adds a team to EventCatalog
668
+ *
669
+ * @param team - The team to write
670
+ * @param options - Optional options to write the team
671
+ *
672
+ */
673
+ writeTeam: (team: Team, options?: {
674
+ override?: boolean;
675
+ }) => Promise<void>;
676
+ /**
677
+ * Returns a team from EventCatalog
678
+ * @param id - The id of the team to retrieve
679
+ * @returns Team|Undefined
680
+ */
681
+ getTeam: (id: string) => Promise<Team | undefined>;
682
+ /**
683
+ * Returns all teams from EventCatalog
684
+ * @returns Team[]|Undefined
685
+ */
686
+ getTeams: (options?: {}) => Promise<Team[]>;
687
+ /**
688
+ * Remove a team by the team id
689
+ *
690
+ * @param id - The id of the team you want to remove
691
+ *
692
+ */
693
+ rmTeamById: (id: string) => Promise<void>;
694
+ /**
695
+ * ================================
696
+ * Users
697
+ * ================================
698
+ */
699
+ /**
700
+ * Adds a user to EventCatalog
701
+ *
702
+ * @param user - The user to write
703
+ * @param options - Optional options to write the user
704
+ *
705
+ */
706
+ writeUser: (user: User, options?: {
707
+ override?: boolean;
708
+ }) => Promise<void>;
709
+ /**
710
+ * Returns a user from EventCatalog
711
+ * @param id - The id of the user to retrieve
712
+ * @returns User|Undefined
713
+ */
714
+ getUser: (id: string) => Promise<User | undefined>;
715
+ /**
716
+ * Returns all user from EventCatalog
717
+ * @returns User[]|Undefined
718
+ */
719
+ getUsers: (options?: {}) => Promise<User[]>;
720
+ /**
721
+ * Remove a user by the user id
722
+ *
723
+ * @param id - The id of the user you want to remove
724
+ *
725
+ */
726
+ rmUserById: (id: string) => Promise<void>;
665
727
  };
666
728
 
667
729
  export { _default as default };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Event, Command, Query, Channel, Service, Domain } from './types.d.js';
1
+ import { Event, Command, Query, Channel, Service, Domain, Team, User } from './types.d.js';
2
2
 
3
3
  /**
4
4
  * Init the SDK for EventCatalog
@@ -463,11 +463,7 @@ declare const _default: (path: string) => {
463
463
  * @returns Service[]|Undefined
464
464
  */
465
465
  getServices: (options?: {
466
- latestOnly? /**
467
- * Returns all events from EventCatalog
468
- * @param latestOnly - optional boolean, set to true to get only latest versions
469
- * @returns Event[]|Undefined
470
- */: boolean;
466
+ latestOnly?: boolean;
471
467
  }) => Promise<Service[]>;
472
468
  /**
473
469
  * Moves a given service id to the version directory
@@ -662,6 +658,72 @@ declare const _default: (path: string) => {
662
658
  id: string;
663
659
  version: string;
664
660
  }, version?: string) => Promise<void>;
661
+ /**
662
+ * ================================
663
+ * Teams
664
+ * ================================
665
+ */
666
+ /**
667
+ * Adds a team to EventCatalog
668
+ *
669
+ * @param team - The team to write
670
+ * @param options - Optional options to write the team
671
+ *
672
+ */
673
+ writeTeam: (team: Team, options?: {
674
+ override?: boolean;
675
+ }) => Promise<void>;
676
+ /**
677
+ * Returns a team from EventCatalog
678
+ * @param id - The id of the team to retrieve
679
+ * @returns Team|Undefined
680
+ */
681
+ getTeam: (id: string) => Promise<Team | undefined>;
682
+ /**
683
+ * Returns all teams from EventCatalog
684
+ * @returns Team[]|Undefined
685
+ */
686
+ getTeams: (options?: {}) => Promise<Team[]>;
687
+ /**
688
+ * Remove a team by the team id
689
+ *
690
+ * @param id - The id of the team you want to remove
691
+ *
692
+ */
693
+ rmTeamById: (id: string) => Promise<void>;
694
+ /**
695
+ * ================================
696
+ * Users
697
+ * ================================
698
+ */
699
+ /**
700
+ * Adds a user to EventCatalog
701
+ *
702
+ * @param user - The user to write
703
+ * @param options - Optional options to write the user
704
+ *
705
+ */
706
+ writeUser: (user: User, options?: {
707
+ override?: boolean;
708
+ }) => Promise<void>;
709
+ /**
710
+ * Returns a user from EventCatalog
711
+ * @param id - The id of the user to retrieve
712
+ * @returns User|Undefined
713
+ */
714
+ getUser: (id: string) => Promise<User | undefined>;
715
+ /**
716
+ * Returns all user from EventCatalog
717
+ * @returns User[]|Undefined
718
+ */
719
+ getUsers: (options?: {}) => Promise<User[]>;
720
+ /**
721
+ * Remove a user by the user id
722
+ *
723
+ * @param id - The id of the user you want to remove
724
+ *
725
+ */
726
+ rmUserById: (id: string) => Promise<void>;
665
727
  };
666
728
 
667
729
  export { _default as default };