Hierarchy

  • default
    • Pages

Constructors

  • Parameters

    • __namedParameters: EndpointOptions

    Returns Pages

Methods

  • Returns a list of all CMS Pages available in the current store. See api docs.

    Success response schema: Success schema

    Failure response schema: Error schema

    Example:

    const pages = await client.pages.list()
    

    Parameters

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

    Returns Promise<IPagesResult>

  • Returns a single CMS Page. You can use either a CMS Page slug or ID. See api docs.

    Options schema:

    interface options {
    id: string
    }

    Success response schema: Success schema

    Failure response schema: Error schema

    Example:

    const page = await client.pages.show({
    id: 'about-us'
    })

    Parameters

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

    Returns Promise<IPageResult>

  • 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