import { ApolloQueryResult } from "@apollo/client/core"; import type { CustomHeaders } from "@vue-storefront/magento-types"; import { CmsPageQuery, CustomQuery } from "@vue-storefront/magento-types"; import { Context } from "../../types/context"; /** * Fetch CMS page * * @example * Simple usage: * ```ts * import { sdk } from '~/sdk.config.ts'; * * // fetch home page by the page identifier * const result = await sdk.magento.cmsPage({ * identifier: 'home' * }); * ``` * * @example * Creating a custom GraphQL query * * ```ts * module.exports = { * integrations: { * magento: { * customQueries: { * 'cms-page-custom-query': ({ variables, metadata }) => ({ * variables, * query: ` * query cmsPage($identifier: String) { * cmsPage(identifier:$identifier) { * ${metadata?.fields} * } * } * ` * }), * }, * } * } * }; * ``` * * @example * Using a custom GraphQL query to reduce the amount of fields returned by the query * * ```ts * import { sdk } from '~/sdk.config.ts'; * // reduce the amount of fields to only the content and title * const customQuery = { * cmsPage: 'cms-page-custom-query', * metadata: { * fields: 'title content' * } * }; * * const result = await sdk.magento.cmsPage({ * identifier: 'home' * }, customQuery); * * // result will only contain the title and content fields * ``` */ export declare function cmsPage(context: Context, identifier: string, customQuery?: CustomQuery, customHeaders?: CustomHeaders): Promise>; //# sourceMappingURL=index.d.ts.map