Hierarchy

  • default
    • Pages

Constructors

  • Parameters

    • __namedParameters: EndpointOptions

    Returns Pages

Methods

  • Returns a list of all CMS Pages. See api docs.

    Required token: Bearer token

    Success response schema: Success schema

    Failure response schema: Error schema

    Example:

    const response = await client.pages.list({
    bearer_token: '7381273269536713689562374856'
    })

    Parameters

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

    Returns Promise<IPagesResult>

  • Returns a single CMS Page by its ID. See api docs.

    Required token: Bearer token

    Success response schema: Success schema

    Failure response schema: Error schema

    Example:

    const response = await client.pages.show({
    bearer_token: '7381273269536713689562374856'
    id: '1'
    })

    Parameters

    • options: _DeepAnyObjectObject<RequiredAccountToken & IQuery & {
          id: string;
      }>

    Returns Promise<IPageResult>

  • Creates a new CMS Page and returns its attributes. See api docs.

    Required token: Bearer token

    Success response schema: Success schema

    Failure response schema: Error schema

    Example:

    const response = await client.pages.create({
    bearer_token: '7381273269536713689562374856',
    cms_page: {
    title: 'About Us',
    type: 'Spree::Cms::Pages::StandardPage',
    meta_title: 'Learn More About Super-Shop',
    content: 'Lot's of text..',
    meta_description: 'Learn more about us on this page here...',
    visible: true,
    slug: 'about-us',
    locale: 'en-US'
    }
    })

    Parameters

    • options: _DeepAnyObjectObject<RequiredAccountToken & IQuery & PageParams>

    Returns Promise<IPageResult>

  • Update selected CMS Page for the signed in User. See api docs.

    Required token: Bearer token

    Success response schema: Success schema

    Failure response schema: Error schema

    Example:

    const response = await client.pages.update({
    bearer_token: '7381273269536713689562374856',
    id: '1',
    cms_page: {
    title: 'About Us',
    type: 'Spree::Cms::Pages::StandardPage',
    meta_title: 'Learn More About Super-Shop',
    content: 'Lots of text..',
    meta_description: 'Learn more about us on this page here...',
    visible: true,
    slug: 'about-us',
    locale: 'en-US'
    }
    })

    Parameters

    • options: _DeepAnyObjectObject<RequiredAccountToken & IQuery & PageParams & {
          id: string;
      }>

    Returns Promise<IPageResult>

  • This endpoint removes the specified CMS Page for the current user. See api docs.

    Required token: Bearer token

    Success response schema: Success schema

    Failure response schema: Error schema

    Example:

    const response = await client.pages.remove({
    bearer_token: '7381273269536713689562374856',
    id: '1'
    })

    Parameters

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

    Returns Promise<NoContentResult>

  • 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