UNPKG

@vtex/client-cms

Version:

A client to fetch data from VTEX CMS.

14 lines (13 loc) 641 B
import type { Options, ContentPage, ContentData, Locator, ContentTypeOptions } from '../utils/types'; declare class ClientCMS { private options; private url; constructor({ tenant, builder, workspace, host, }: Options); getOptions(): Options; getApiUrl: () => string; fetch<T>(path?: string, params?: URLSearchParams): Promise<T>; getAllContentTypeIds: () => Promise<string[]>; getCMSPagesByContentType: (contentType: string, { page, perPage, filters }?: Partial<ContentTypeOptions>) => Promise<ContentPage>; getCMSPage: (locator: Locator) => Promise<ContentData>; } export default ClientCMS;