import { type Response } from './request';
import type { AppInfo, Error as ClientAppEngineRegistryError } from '@dynatrace-sdk/client-app-engine-registry';
import type { User } from '../interfaces/gateway-api';
import type { DynatraceDependency } from '../interfaces';
/**
 * @internal
 */
export declare const APP_REGISTRY_BASE_URL = "/platform/app-engine/registry/v1";
/**
 * Creates an error failures while communicating with the App Gateway.
 * @param message
 * @param response
 */
export declare function gatewayCommunicationErrorFromHttpError(message: string, error: ClientAppEngineRegistryError, status?: number, statusText?: string, dependencies?: DynatraceDependency[]): Error;
export declare enum HTML_RESPONSES {
    NOT_OK = 0,
    OK = 1
}
/**
 * Retrieve metadata for the tenant-scope or global app with the given ID or undefined if app has not been found
 * @param appGateway App gateway root api url
 * @param token Authentication token
 * @param appId The app ID
 */
export declare function getApp(appGateway: string, token: string, appId: string): Promise<AppInfo | undefined>;
/** Handles invalid response */
/** Handles invalid response */
export declare function handleInvalidResponse(response: Response): Promise<HTML_RESPONSES | void>;
/**
 * Returns the logged in user from App Gateway
 * @param appGatewayUrl App gateway root api url
 * @param token Authentication token
 */
export declare function getUser(appGatewayUrl: string, token: string): Promise<User | undefined>;
/**
 * Install an app to the given appGateway
 * @param appGatewayUrl App gateway root api url
 * @param appArchive App archive
 * @param token Authentication token
 */
export declare function installApp(appGatewayUrl: string, appArchive: Buffer, token: string, dependencies: DynatraceDependency[]): Promise<void | Error>;
/**
 * Uninstalls an app from the given appGateway
 * @param appGatewayUrl App gateway root api url
 * @param appId AppId which should be uninstalled from the gateway
 * @param token Authentication token
 */
export declare function uninstallApp(appGatewayUrl: string, appId: string, token: string): Promise<void | Error>;
/**
 * @param environmentUrl
 * @param getToken Function to retrieve the token
 * @returns The current default csp policy from the app registry
 */
export declare function fetchDefaultCspPolicyFromAppRegistry(environmentUrl: string, token: string): Promise<Record<string, string[]>>;
