/** * ------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. * See License in the project root for license information. * ------------------------------------------------------------------------------------------- */ import { type AuthenticationProvider, type BackingStoreFactory, InMemoryBackingStoreFactory, type ErrorMappings, type Parsable, type ParsableFactory, type ParseNodeFactory, type PrimitiveTypesForDeserialization, type PrimitiveTypesForDeserializationType, type RequestAdapter, type RequestInformation, type SerializationWriterFactory } from "@microsoft/kiota-abstractions"; import { HttpClient } from "./httpClient.js"; import { type ObservabilityOptions } from "./observabilityOptions.js"; /** * Request adapter implementation for the fetch API. */ export declare class FetchRequestAdapter implements RequestAdapter { readonly authenticationProvider: AuthenticationProvider; private parseNodeFactory; private serializationWriterFactory; private readonly httpClient; private backingStoreFactory; /** The base url for every request. */ baseUrl: string; getSerializationWriterFactory(): SerializationWriterFactory; getParseNodeFactory(): ParseNodeFactory; getBackingStoreFactory(): BackingStoreFactory; private readonly observabilityOptions; /** * Instantiates a new request adapter. * @param authenticationProvider the authentication provider to use. * @param parseNodeFactory the parse node factory to deserialize responses. * @param serializationWriterFactory the serialization writer factory to use to serialize request bodies. * @param httpClient the http client to use to execute requests. * @param observabilityOptions the observability options to use. * @param backingStoreFactory the backing store factory to use. */ constructor(authenticationProvider: AuthenticationProvider, parseNodeFactory?: ParseNodeFactory, serializationWriterFactory?: SerializationWriterFactory, httpClient?: HttpClient, observabilityOptions?: ObservabilityOptions, backingStoreFactory?: InMemoryBackingStoreFactory); private readonly getResponseContentType; private readonly getResponseHandler; private static readonly responseTypeAttributeKey; sendCollectionOfPrimitive: >(requestInfo: RequestInformation, responseType: Exclude, errorMappings: ErrorMappings | undefined) => Promise; sendCollection: (requestInfo: RequestInformation, deserialization: ParsableFactory, errorMappings: ErrorMappings | undefined) => Promise; private readonly startTracingSpan; static readonly eventResponseHandlerInvokedKey = "com.microsoft.kiota.response_handler_invoked"; send: (requestInfo: RequestInformation, deserializer: ParsableFactory, errorMappings: ErrorMappings | undefined) => Promise; sendPrimitive: (requestInfo: RequestInformation, responseType: PrimitiveTypesForDeserialization, errorMappings: ErrorMappings | undefined) => Promise; sendNoResponseContent: (requestInfo: RequestInformation, errorMappings: ErrorMappings | undefined) => Promise; sendEnum: >(requestInfo: RequestInformation, enumObject: EnumObject, errorMappings: ErrorMappings | undefined) => Promise; sendCollectionOfEnum: >(requestInfo: RequestInformation, enumObject: EnumObject, errorMappings: ErrorMappings | undefined) => Promise; enableBackingStore: (backingStoreFactory?: BackingStoreFactory) => void; private readonly getRootParseNode; private readonly shouldReturnUndefined; /** * purges the response body if it hasn't been read to release the connection to the server * @param response the response to purge */ private readonly purgeResponseBody; static readonly errorMappingFoundAttributeName = "com.microsoft.kiota.error.mapping_found"; static readonly errorBodyFoundAttributeName = "com.microsoft.kiota.error.body_found"; private static readonly locationHeaderName; private readonly throwIfFailedResponse; private readonly getHttpResponseMessage; static readonly authenticateChallengedEventKey = "com.microsoft.kiota.authenticate_challenge_received"; private readonly retryCAEResponseIfRequired; private readonly getClaimsFromResponse; private readonly setBaseUrlForRequestInformation; private readonly getRequestFromRequestInformation; private readonly foldHeaderValue; /** * @inheritdoc */ convertToNativeRequest: (requestInfo: RequestInformation) => Promise; } //# sourceMappingURL=fetchRequestAdapter.d.ts.map