Websites v4 docs v5.2.5
    Preparing search index...

    Hierarchy

    Index

    Properties

    serializer: (model: any) => any

    serializer is a pure function that takes a model instance and returns a plain object that describes how to convert the model to JSON

    Accessors

    • get preferences(): Partial<AgencyPreferences> | null

      The raw agency preferences contains API keys so we must remove them here so the agency can safely be serialized and passed to client components (we don't remove the google maps key as it is designed for use client-side).

      In future if we need to access any of the keys from agency preferences we might need a different solution for this.

      Returns Partial<AgencyPreferences> | null

    Methods

    • Retrieves a value from raw API data. Prioritises DBAPI data if available

      Parameters

      • key: string

      Returns any

    • Fetches dbapi data to make available for additional getters without harming performance of themes that only require hestia data.

      Returns Promise<void>

    • Returns a menu by name from the agency data. Menus are configured in the CMS.

      Parameters

      • name: "mobile" | "footer" | "primary" | "secondary" | "branch_primary"

      Returns AgencyMenu | null

      const primaryMenu = agency.getMenu('primary');

      if (!primaryMenu) return null;

      const { menu_items: menuItems } = primaryMenu;
    • Special method to define behaviour of JSON.stringify() on model instance

      Returns any