import type { Response } from 'undici'; 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 appId The app ID */ export declare function getApp(appGateway: string, appId: string): Promise; /** Handles invalid response */ export declare function handleInvalidResponse(response: Response): Promise; /** * Returns the logged in user from App Gateway * @param appGatewayUrl App gateway root api url * @param token Optional bearer token. When passed, the request is authenticated with this * token instead of acquiring one via `getBearerToken`. Used by the telemetry path, which * must never trigger an interactive SSO login. */ export declare function getUser(appGatewayUrl: string, token?: string): Promise; /** * Install an app to the given appGateway * @param appGatewayUrl App gateway root api url * @param appArchive App archive */ export declare function installApp(appGatewayUrl: string, appArchive: Buffer, dependencies: DynatraceDependency[]): Promise; /** * Uninstalls an app from the given appGateway * @param appGatewayUrl App gateway root api url * @param appId AppId which should be uninstalled from the gateway */ export declare function uninstallApp(appGatewayUrl: string, appId: string): Promise; /** * @param environmentUrl * @returns The current default csp policy from the app registry */ export declare function fetchDefaultCspPolicyFromAppRegistry(environmentUrl: string): Promise>;