import type { RequestContext } from '../gqty/index.js'; export declare const TOKEN_ENDPOINT_PARTIAL_PATH = "auth/token"; export declare const LOGOUT_ENDPOINT_PARTIAL_PATH = "auth/logout"; /** * The configuration for your faustjs site * * @export * @interface Config */ export interface Config extends Record { /** * Set this value to the base URL of your WordPress site. This will be used in order to * make queries to your WordPress site. * * @type {string} * @memberof Config */ wpUrl: string; /** * Set this value to the URL of your GraphQL endpoint. * * @example https://my-site.graphql-cdn.com * @example /my-graphql-endpoint * * @default wpUrl + /graphql * @type {string} * @memberof Config */ gqlUrl?: string; /** * Set this value to the relative base path of your API endpoints for this application. * * @example /api/faust * * @default /api/faust * @type {string} * @memberof Config */ apiBasePath?: string; /** * Set this to the secret provided by the Headless WordPress plugin to be used for authentication * * @type {string} * @memberof Config */ apiClientSecret?: string; /** * Set this to the type of authentication you want to use. * * Redirect authentication redirects users to the WordPress login page to authenticate, * where local assumes that you have setup a login page on your frontend site. * * @default redirect * @memberof Config */ authType?: 'redirect' | 'local'; /** * Set this to the relative URL path of your frontend login page. * * @example /login * * @default /login * @type {string} * @memberof Config */ loginPagePath?: string; /** * Set to true if you want to disable internal console.log statements * * @type {string} * @memberof Config */ disableLogging?: boolean; /** * Called before every request, use this to apply any headers you might * need to for your requests or adjust the request to suite your needs. * * @deprecated This property is not used anymore and has no effect. You should use this function in [getClient](https://faustjs.org/docs/next/guides/modifying-the-graphql-request) instead. This will be removed in subsequent versions of Faust.js. * @param {string} url * @param {RequestInit} init * @returns {RequestContext} * @memberof Config */ applyRequestContext?(url: string, init: RequestInit): Promise | RequestContext; } /** * Takes a Config and ensures the properties that need to be normalized * (e.g. URL slashes trimmed, etc) are handled. * * @export * @param {Config} config * @returns {Config} */ export declare function normalizeConfig(config: Config): Config; /** * A setter/getter for the Config * * @export * @param {Config} [cfg] * @returns {Config} */ export declare function config(cfg?: Config): Config; /** * Get the full URL to the GraphQL endpoint * * @export * @returns */ export declare function getGqlUrl(): string;