import { LoggerContext } from './../../../../platform-sdk-logging'; import { NeptuneFailureDetails, NeptuneFailureReason } from "../errors"; import { NeptuneErrorStatusAttributeValue, NeptuneResponseErrorDetails, WithNeptuneErrorHandler } from "./types"; import { InternalGremlinRemoteConnection, NeptuneStaticConfig } from "../types"; export declare type PossibleGremlinServerResponseError = { name: string; message: string; stack?: string; statusCode?: number; statusMessage?: string; statusAttributes?: Map; }; export declare type DecodedNeptuneResponseError = { failureReason: NeptuneFailureReason; failureDetails: NeptuneFailureDetails; retryable: boolean | undefined; }; export declare type DecodedNeptuneError = NeptuneResponseErrorDetails & DecodedNeptuneResponseError; export declare type DecodeNeptuneResponseErrorFunc = (errorDetails: NeptuneResponseErrorDetails) => DecodedNeptuneResponseError; export declare type PossibleAwsNeptuneResponseError = Error & { statusCode?: number; statusMessage?: string; statusAttributes?: Map; }; export declare type EnrichNeptuneErrorFunc = (decodedNeptuneError: DecodedNeptuneResponseError) => Promise; export declare type SafeNeptuneInvokeConfig = { gremlinConnection: InternalGremlinRemoteConnection; neptuneConfig: NeptuneStaticConfig; operationName: string; invocable: () => Promise; decodeNeptuneResponseError?: DecodeNeptuneResponseErrorFunc; enrichNeptuneError?: EnrichNeptuneErrorFunc; }; export declare function normalizeAwsNeptuneError(err: PossibleAwsNeptuneResponseError): NeptuneResponseErrorDetails; export declare function safeNeptuneInvoke(context: LoggerContext, options: WithNeptuneErrorHandler, config: SafeNeptuneInvokeConfig): Promise;