import { ApiKeyValidationService } from '@squiz/dx-common-lib';
import { type Request as ExpressRequest } from 'express';
import { ComponentFunctionService, ComponentSet, ComponentSetService, ContentItemService, Headers, Manifest, ManifestModel, ManifestService, ManifestV1, ManifestV1Model, RuntimeComponentSet } from '@squiz/component-lib';
import { MANIFEST_MODELS } from '@squiz/dx-json-schema-lib';
export type QueryParameters = Record<string, string>;
export type RenderRequestInput = {
    componentSet: string | undefined;
    namespace: string;
    componentName: string;
    version: string;
    previewKey: string | undefined;
    contentItemId: string | undefined;
    expressRequest: ExpressRequest;
    functionName: string | undefined;
};
interface BaseComponentExecutionInput {
    requestId: string;
    functionEntryFilePath: string;
    runtimeSet: RuntimeComponentSet;
    input: any;
    componentRootUrl: string;
    componentFullName: string;
    functionName: string;
    manifestForWeb: ManifestModel;
    manifest: Manifest;
    componentFunction: MANIFEST_MODELS.v1.ComponentFunction;
    dxpApiKey?: string;
    headers: Headers;
    queryParameters: QueryParameters;
}
interface ComponentExecutionInputContentItemAndSet extends BaseComponentExecutionInput {
    renderType: 'content-item-and-set';
    componentSet: ComponentSet;
}
interface ComponentExecutionInputSetWithoutContentItem extends BaseComponentExecutionInput {
    renderType: 'set-without-content-item';
    componentSet: ComponentSet;
}
interface ComponentExecutionInputPreview extends BaseComponentExecutionInput {
    renderType: 'preview';
    previewKey: string;
    manifestPath: string;
}
export type ComponentExecutionInput = ComponentExecutionInputContentItemAndSet | ComponentExecutionInputSetWithoutContentItem | ComponentExecutionInputPreview;
export type RenderTypes = ComponentExecutionInput['renderType'];
export declare const DXP_PUBLIC_FACING_URL_HEADER = "x-dxp-service-request-url";
export declare class RenderInputService {
    protected apiKeyService: ApiKeyValidationService;
    protected componentSetService: ComponentSetService;
    protected manifestService: ManifestService;
    protected componentFunctionService: ComponentFunctionService;
    protected contentItemService: ContentItemService | undefined;
    protected rootUrl: string;
    constructor(apiKeyService: ApiKeyValidationService, componentSetService: ComponentSetService, manifestService: ManifestService, componentFunctionService: ComponentFunctionService, contentItemService: ContentItemService | undefined, rootUrl: string);
    resolveInput(request: RenderRequestInput): Promise<ComponentExecutionInput>;
    protected getRenderType(request: RenderRequestInput): RenderTypes;
    protected getContentItemAndSetInput(request: RenderRequestInput, manifest: ManifestV1): Promise<ComponentExecutionInput>;
    protected getSetWithoutContentItem(request: RenderRequestInput, manifest: ManifestV1): Promise<ComponentExecutionInput>;
    protected getPreviewRenderInput(request: RenderRequestInput, manifest: ManifestV1): Promise<ComponentExecutionInput>;
    protected getQueryParametersFromRequest(request: RenderRequestInput, componentFunction: MANIFEST_MODELS.v1.ComponentFunction): QueryParameters;
    protected getPreviewRuntimeSet(manifest: ManifestV1): {
        webPath: string;
        displayName: string;
        environment: {
            [k: string]: string | undefined;
        };
    };
    protected assertInputIsValid(input: any, componentFunction: MANIFEST_MODELS.v1.ComponentFunction): void;
    protected assertRenderInputIsValid(input: any, componentFunction: MANIFEST_MODELS.v1.ComponentFunction): void;
    protected assertComponentVersionInSet(request: RenderRequestInput, manifest: ManifestV1): Promise<void>;
    protected getInputForPreview(request: RenderRequestInput, manifest: ManifestV1): Promise<any>;
    protected loadEnvironmentVariablesForPreview(manifest: ManifestV1Model): {
        [k: string]: string | undefined;
    };
    protected getContentFromContentService(request: RenderRequestInput): Promise<{}>;
    protected getPublicFacingUrl(request: ExpressRequest): string;
    protected getDxpApiKey(): string | undefined;
}
export {};
