import { Page, GCAPage, Dataset, Image, NavigationData, FetchByFilterParams, FetchNavigationParams, FetchProjectPropertiesParams, FetchElementParams, FSXAApi, ConnectEventStreamParams, ProxyApiFilterOptions, ProjectProperties } from '../types'; import { LogLevel } from './Logger'; import { FetchResponse } from '..'; /** * This class represents the functionality of the FSXA-API as a proxy. * To use this class, there must be an instance of FSXARemoteApi that is accessed here. * By using this class, no secrets are provided to the client. * @see FSXARemoteApi */ export declare class FSXAProxyApi implements FSXAApi { mode: 'proxy'; private _baseUrl; private _method; private _headers; private _logger; private _enableEventStream; private _filterContextProvider?; /** * This method requests the current state of baseUrl * @param baseUrl specifies the base Url for the FSXA-Proxy-Api */ get baseUrl(): string; /** * This method sets a new state of baseUrl * @param baseUrl specifies the base Url for the FSXA-Proxy-Api */ set baseUrl(value: string); /** * Creates a new instance with the connection to the FSXARemoteAPI * @param baseUrl specifies the URL to communicate with * @param logLevel specifies the restrictions of logs which will be displayed * @param filterOptions optional {@link ProxyApiFilterOptions ProxyApiFilterOptions} (EXPERIMENTAL) */ constructor(baseUrl: string, logLevel?: LogLevel, filterOptions?: ProxyApiFilterOptions); /** * This methods fetches a specific element by its Id and its fetch options * @param id specifies the element that needs to be fetched * @param locale specifies the language e.g. de_DE * @param additionalParams sets parameters for the fetching process * @param remoteProject specifies the remote Project * @param fetchOptions specifies the options for the fetching process * @returns a JSON from the fetched element */ fetchElement({ id, locale, additionalParams, remoteProject, fetchOptions, }: FetchElementParams): Promise; /** * This method fetches elements found by a specified Filter * @param filters specifies the filter that needs to be fetched * @param locale specifies the language * @param page specifies the page * @param pagesize specifies the number of pages * @param additionalParams specifies additional parameters for the fetching process * @param remoteProject specifies the remote project for the fetching process * @param fetchOptions specifies options in the fetching process * @param sort specifies the fields to sort. Default is by id descending. Multiple sortParams are possible. First parameter is prioritized over subsequent. * @returns a JSON from the fetched elements * * @example * ``` * const response = await api.fetchByFilter({filters: [], locale: de'DE', page: 1, pagesize: 10, additionalParams: {}, remoteProject: 'my-project'}) * ``` */ fetchByFilter({ filters, locale, page, pagesize, additionalParams, remoteProject, fetchOptions, sort, }: FetchByFilterParams): Promise; /** * This method fetches the navigation * @param initialPath to identify the navigation * @param locale specifies the Language * @param fetchOptions specifies options in the fetching Process * @returns a JSON from the fetching process */ fetchNavigation({ initialPath, locale, fetchOptions, }: FetchNavigationParams): Promise; /** * This method fetches Project Properties * @param locale specifies the language * @param resolver * @param fetchOptions specifies options in the fetching process * @returns a JSON from the fetching results */ fetchProjectProperties({ locale, resolver, fetchOptions, }: FetchProjectPropertiesParams): Promise; /** * Getter/Setter to enable the CaaS event stream * @returns true, if a event stream should pipe events from CaaS change events websocket */ enableEventStream(enable?: boolean): boolean; /** * This method initilises an `EventSoure` pointing to the CaaS change event stream. * @param additionalParams sets parameters for the fetching process * @param remoteProject specifies the remote Project * @returns an EventSource */ connectEventStream({ remoteProject, }?: ConnectEventStreamParams): EventSource; private fetch; }