import type { GoFeatureFlagProviderOptions } from '../go-feature-flag-provider-options'; import type { ExporterMetadata, ExportEvent, FlagConfigResponse } from '../model'; import type { Logger } from '@openfeature/server-sdk'; /** * GOFeatureFlagApi is a class that provides methods to interact with the GO Feature Flag API. */ export declare class GoFeatureFlagApi { private readonly endpoint; private readonly timeout; private readonly apiKey?; private readonly fetchImplementation; private readonly logger?; /** * Constructor for GoFeatureFlagApi. * @param options Options provided during the initialization of the provider * @throws Error when options are not provided */ constructor(options: GoFeatureFlagProviderOptions, logger?: Logger); /** * RetrieveFlagConfiguration is a method that retrieves the flag configuration from the GO Feature Flag API. * @param etag If provided, we call the API with "If-None-Match" header. * @param flags List of flags to retrieve, if not set or empty, we will retrieve all available flags. * @returns A FlagConfigResponse returning the success data. * @throws FlagConfigurationEndpointNotFoundException if the endpoint is not reachable. * @throws ImpossibleToRetrieveConfigurationException if the endpoint is returning an error. */ retrieveFlagConfiguration(etag?: string, flags?: string[]): Promise; /** * Sends a list of events to the GO Feature Flag data collector. * @param eventsList List of events * @param exporterMetadata Metadata associated. * @throws UnauthorizedException when we are not authorized to call the API * @throws ImpossibleToSendDataToTheCollectorException when an error occurred when calling the API */ sendEventToDataCollector(eventsList: ExportEvent[], exporterMetadata: ExporterMetadata): Promise; /** * HandleFlagConfigurationSuccess is handling the success response of the flag configuration request. * @param response HTTP response. * @param body String of the body. * @returns A FlagConfigResponse object. */ private handleFlagConfigurationSuccess; }