@dotcms/client
Version:
Official JavaScript library for interacting with DotCMS REST APIs.
25 lines (24 loc) • 811 B
TypeScript
/**
* Represents the response from a GraphQL query for a page.
*
* @interface GraphQLPageResponse
* @property {Record<string, unknown>} page - The main page data.
* @property {unknown} [key: string] - Additional properties that may be included in the response.
*/
interface GraphQLPageResponse {
page: Record<string, unknown>;
[key: string]: unknown;
}
/**
* Transforms a GraphQL Page response to a Page Entity.
*
* @param {GraphQLPageResponse} graphQLPageResponse - The GraphQL Page response object.
* @returns {object|null} The transformed Page Entity or null if the page is not present.
*
* @example
* ```ts
* const pageEntity = graphqlToPageEntity(graphQLPageResponse);
* ```
*/
export declare const graphqlToPageEntity: (graphQLPageResponse: GraphQLPageResponse) => any;
export {};