Hierarchy

  • default
    • Menus

Constructors

  • Parameters

    • __namedParameters: EndpointOptions

    Returns Menus

Methods

  • Returns a list of Menus. See api docs.

    Options schema:

    interface options {
    locale?: string
    filter?: {
    location?: string
    }
    }

    Success response schema: Success schema

    Failure response schema: Error schema

    Example:

    const response = await client.menus.list({
    locale: 'fr',
    filter: {
    location: 'header'
    }
    })

    Parameters

    • Optional options: _DeepAnyObjectObject<Record<string, unknown> & IQuery & MenusList>

    Returns Promise<MenusResult>

  • Returns a single Menu. See api docs.

    Options schema:

    interface options {
    id: string
    }

    Success response schema: Success schema

    Failure response schema: Error schema

    Example:

    const response = await client.menus.show({
    id: '2'
    })

    Parameters

    • options: _DeepAnyObjectObject<Record<string, unknown> & IQuery & {
          id: string;
      }>

    Returns Promise<MenuResult>

  • Type Parameters

    • ResponseType = JsonApiResponse

    Parameters

    • method: HttpMethod
    • url: string
    • Optional tokens: IToken
    • Optional params: any
    • Optional responseParsing: ResponseParsing

    Returns Promise<ResultResponse<ResponseType>>

  • The HTTP error code returned by Spree is not indicative of its response shape. This function determines the information provided by Spree and uses everything available.

    Parameters

    • error: default

    Returns ErrorType

  • Parameters

    • error: Error

    Returns default

  • Parameters

    • error: default

    Returns default

  • Parameters

    • tokens: IToken

    Returns {
        [headerName: string]: string;
    }

    • [headerName: string]: string

Properties

fetcher: Fetcher

Generated using TypeDoc