/* * Copyright 2021 Adobe. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ import { OneDrive } from '@adobe/helix-onedrive-support'; import { UniversalContext } from '@adobe/helix-universal'; import { ProjectConfig } from '../types/project-config'; import { ConfigAll } from "../types/project-config-all"; import { HelixConfig } from "../types/helix-config"; declare interface AuthInfo { } declare interface MountConfig { } declare interface IgnoreConfig { } declare interface IndexConfig { } declare interface SitemapConfig { } export * from './fetch-config-all'; export * from './fetch-config'; export * from './contentbus'; export * from './fetch-crontab'; export * from './fetch-fstab'; export * from './fetch-ignore'; export * from './fetch-index'; export * from './fetch-helix-config'; export * from './fetch-s3'; export * from './fetch-sitemap'; export * from './flatJson2Object'; export * from './BatchedQueueClient'; export * from './UpdatesPartitioner'; export * from '../types/helix-config'; export * from '../types/project-config'; export * from '../types/project-config-all'; export declare interface ErrorResponse { /** * http like status code */ status: number; /** * error message */ error: string; } /** * Path Info */ export declare interface PathInfo { /** * Original path */ rawPath: string, /** * API route */ route: string; /** * Repository owner (lowercase) */ owner: string; /** * Repository name (lowercase) */ repo: string; /** * Repository ref (lowercase) */ ref: string; /** * Repository ref (case) */ branch: string; /** * Resource path * @example '/express/index.md' * @example '/en/query-index.json' */ resourcePath: string; /** * Resource path extension */ ext: string; /** * Web path * @example '/express/' * @example '/blogs/may-21' * @example '/en/query-index.json' */ path: string; /** * The precomputed live url */ liveUrl: string; /** * The precomputed preview url */ previewUrl: string; /** * request scheme */ scheme: string; /** * request host */ host: string; /** * request method */ method: string; /** * request parameters relevant for creating external links, eg. version-lock */ query: object; /** * function path (aka servletPath) */ functionPath: string; /** * request headers */ headers: object; /** * request cookies */ cookies?: object; } export declare interface ContextAttributes { /** * optional mount config, once fetched */ mountConfig?: MountConfig; /** * optional ignore config, once fetched */ ignoreConfig?: IgnoreConfig; /** * optional index config, once fetched */ indexConfig?: IndexConfig; /** * optional sitemap config, once fetched */ sitemapConfig?: SitemapConfig; /** * optional content bus id from the `x-helix-contentbus-id` header or computed from fstab. */ contentBusId?: string; /** * optional code bus id */ codeBusId?: string; /** * Authentication information */ authInfo: AuthInfo; /** * optional project config */ projectConfig?: ProjectConfig; /** * optional redirects information */ redirects?: object; /** * onedrive client */ onedrive?: OneDrive; /** * Notifier */ notifier?: object; /** * combined config (content) */ configAll?: ConfigAll; /** * combined helix-config (code) */ helixConfig?: HelixConfig; } export declare interface AdminContext extends UniversalContext { /** * optional github token extracted from the `x-github-token` header */ githubToken?: string; /** * Additional context attributes */ attributes: ContextAttributes; /** * context data provided via helix-shared-body */ data?: object; }