Hierarchy

  • default
    • Products

Constructors

  • Parameters

    • __namedParameters: EndpointOptions

    Returns Products

Methods

  • Returns a list of Products. See api docs.

    Required token: Bearer token - if logged in user

    Options schema:

    interface options {
    image_transformation?: {
    size?: string
    quality?: number
    }
    }

    Success response schema: Success schema

    Failure response schema: Error schema

    Example:

    const response = await client.products.list({
    page: 1,
    per_page: 10
    })

    Parameters

    • options: ListOptions

    Returns Promise<IProductsResult>

  • Returns a single product. See api docs.

    Required token: Bearer token - if logged in user

    Options schema:

    interface options {
    image_transformation?: {
    size?: string
    quality?: number
    }
    }

    Success response schema: Success schema

    Failure response schema: Error schema

    Example:

    const response = await client.products.show({
    id: '123',
    include: 'variants'
    })

    Parameters

    • options: ShowOptions

    Returns Promise<IProductResult>

  • 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