import type { AxiosRequestConfig, AxiosResponse } from 'axios'; import { Axios } from 'axios'; import type { Logger } from '@sap-ux/logger'; /** * OData versions supported by Fiori elements */ export declare enum ODataVersion { v2 = "2", v4 = "4" } export interface ServiceDocument { EntitySets: string[]; } export interface ODataServiceExtension { /** * Retrieves the service document. * * @returns A Promise that resolves to a ServiceDocument */ document(): Promise; /** * Retrieves the metadata of the service. * * @returns A Promise that resolves to a string containing the metadata */ metadata(): Promise; } export interface ODataResponse extends AxiosResponse { /** * */ odata(): T; } /** * Class extending Axios representing an OData service. */ export declare class ODataService extends Axios implements ODataServiceExtension { log: Logger; protected doc: ServiceDocument; protected metadataDoc: string; /** * Get the service description document. * * @returns a service description containing all exposed entities */ document(): Promise; /** * Get the metadata of the service. * * @returns service metadata */ metadata(): Promise; /** * Send a get request to the OData service with some preset always used parameters. * * @param url relative url to the service * @param config additional axios request config * @param includeV4ControlData include the control information that is not part of the odata value but may be required e.g. `@odata.nextLink` * @returns a response enhanced with an OData parse method */ get, D = any>(url: string, config?: AxiosRequestConfig, includeV4ControlData?: boolean): Promise; } //# sourceMappingURL=odata-service.d.ts.map