UNPKG

@dotcms/client

Version:

Official JavaScript library for interacting with DotCMS REST APIs.

34 lines (33 loc) 1.06 kB
import { PageApiOptions } from '../../client/sdk-js-client'; /** * Interface representing the properties for page request parameters. * * @export * @interface PageRequestParamsProps */ export interface PageRequestParamsProps { /** * The API endpoint path. * @type {string} */ path: string; /** * The query parameters for the API request. * Can be an object with key-value pairs or a URLSearchParams instance. * @type {{ [key: string]: unknown } | URLSearchParams} */ params: { [key: string]: unknown; } | URLSearchParams; } /** * Generates the page request parameters to be used in the API call. * * @param {PageRequestParamsProps} PageRequestParamsProps - The properties for the page request. * @returns {PageApiOptions} The options for the page API. * @example * ```ts * const pageApiOptions = getPageRequestParams({ path: '/api/v1/page', params: queryParams }); * ``` */ export declare const getPageRequestParams: ({ path, params }: PageRequestParamsProps) => PageApiOptions;