Class StoreDomainService

Hierarchy

  • StoreDomainService

Constructors

Properties

defaultStoreDomainId: number = 1

Methods

  • Use this utility to perform async actions on each locale. The actions will be run sequentially and will stop upon any error.

    Type Parameters

    • T

    Parameters

    • actionFn: ((store: {
          currency: string;
          locale: string;
          storeDomain: string;
          storeDomainId: number;
          storeName: string;
      }) => T)
        • (store: {
              currency: string;
              locale: string;
              storeDomain: string;
              storeDomainId: number;
              storeName: string;
          }): T
        • Parameters

          • store: {
                currency: string;
                locale: string;
                storeDomain: string;
                storeDomainId: number;
                storeName: string;
            }
            • currency: string
            • locale: string
            • storeDomain: string
            • storeDomainId: number
            • storeName: string

          Returns T

    Returns Promise<T[]>

  • Use this utility to perform async actions on each store. The actions will be run sequentially and will stop upon any error.

    Type Parameters

    • T

    Parameters

    • actionFn: ((store: {
          currency: string;
          defaultLocale: string;
          description: string;
          storeDomain: string;
          storeDomainId: number;
          storeName: string;
      }) => T)
        • (store: {
              currency: string;
              defaultLocale: string;
              description: string;
              storeDomain: string;
              storeDomainId: number;
              storeName: string;
          }): T
        • Parameters

          • store: {
                currency: string;
                defaultLocale: string;
                description: string;
                storeDomain: string;
                storeDomainId: number;
                storeName: string;
            }
            • currency: string
            • defaultLocale: string
            • description: string
            • storeDomain: string
            • storeDomainId: number
            • storeName: string

          Returns T

    Returns Promise<T[]>

  • Use this method to look up a single store domain. It will throw an error if no match is found.

    Parameters

    • __namedParameters: {
          domain?: string;
          locale?: string;
          storeDomainId?: string | number;
      }
      • Optional domain?: string
      • Optional locale?: string
      • Optional storeDomainId?: string | number

    Returns Promise<Readonly<StoreDomain>>

  • Use this method to get all store domains.

    Returns Promise<readonly StoreDomain[]>

  • Use this method to get the default locale for a store domain. It will throw an error if no match is found.

    Parameters

    • domainQuery: StoreDomain | {
          currency?: string;
          domain?: string;
          storeDomainId?: string | number;
      }

    Returns Promise<string>

  • Use this method to look up a single store locale.

    Parameters

    • __namedParameters: {
          locale: string;
      }
      • locale: string

    Returns Promise<undefined | Readonly<StoreLocale>>

  • Use this method to get all store locales.

    Returns Promise<readonly StoreLocale[]>

Generated using TypeDoc