Skip to main content
New project sponsor 🪝Hookdeck: Serverless infrastructure for event-driven architecture. Learn more.

getDomain

Callable

  • getDomain(directory: string): (id: string, version?: string) => Promise<Domain>

  • Returns a domain from EventCatalog.

    You can optionally specify a version to get a specific version of the domain

    @example
    import utils from '@eventcatalog/utils';

    const { getDomain } = utils('/path/to/eventcatalog');

    // Gets the latest version of the domain
    const domain = await getDomain('Payment');

    // Gets a version of the domain
    const domain = await getDomain('Payment', '0.0.1');